Reverting method name to newSession

This commit is contained in:
itdominator 2025-06-21 16:28:41 -05:00
parent 598a66f517
commit 52a3785168
2 changed files with 8 additions and 11 deletions

View File

@ -87,7 +87,7 @@ export class EditorsComponent {
siblingComponent.editor.setSession(session); siblingComponent.editor.setSession(session);
siblingComponent.activeFile = editorComponent.activeFile; siblingComponent.activeFile = editorComponent.activeFile;
editorComponent.newBuffer(); editorComponent.newSession();
siblingComponent.editor.focus() siblingComponent.editor.focus()
} else if (message.action === "move-session-right") { } else if (message.action === "move-session-right") {
let editorComponent = this.editorsService.get(message.editorUUID); let editorComponent = this.editorsService.get(message.editorUUID);
@ -102,7 +102,7 @@ export class EditorsComponent {
siblingComponent.editor.setSession(session); siblingComponent.editor.setSession(session);
siblingComponent.activeFile = editorComponent.activeFile; siblingComponent.activeFile = editorComponent.activeFile;
editorComponent.newBuffer(); editorComponent.newSession();
siblingComponent.editor.focus() siblingComponent.editor.focus()
} else if (message.action === "set-active-editor") { } else if (message.action === "set-active-editor") {
this.editorsService.get(this.activeEditor).removeActiveStyling(); this.editorsService.get(this.activeEditor).removeActiveStyling();
@ -122,7 +122,7 @@ export class EditorsComponent {
for (let i = 0; i < editors.length; i++) { for (let i = 0; i < editors.length; i++) {
let editorComponent = editors[i].instance; let editorComponent = editors[i].instance;
if (editorComponent.editor.session == file.session) { if (editorComponent.editor.session == file.session) {
editorComponent.newBuffer(); editorComponent.newSession();
} }
} }

View File

@ -131,11 +131,10 @@ export class NewtonEditorComponent extends NewtonEditorBase {
} }
public newBuffer() { public newSession() {
let buffer = ace.createEditSession([""]);
this.editor.setSession(buffer);
this.activeFile = null; this.activeFile = null;
this.updateInfoBar(); let session = ace.createEditSession([""]);
this.editor.setSession(session);
} }
protected openFiles() { protected openFiles() {
@ -163,11 +162,9 @@ export class NewtonEditorComponent extends NewtonEditorBase {
window.fs.saveFileAs().then((path: string) => { window.fs.saveFileAs().then((path: string) => {
if (!path) return; if (!path) return;
let file: NewtonFile = new File([""], path, { let file: NewtonFile = new File([""], path, {});
type: "text/plain",
});
const text = this.editor.session.getValue(); const text = this.editor.session.getValue();
window.fs.saveFile(path, text); window.fs.saveFile(path, text);
this.filesService.addFile( this.filesService.addFile(
path, path,