BUGFIX: Save position of cursor when switching tabs and unmounting editor (#1297)

This commit is contained in:
catloversg
2024-05-23 15:51:33 +07:00
committed by GitHub
parent 7f8757b536
commit 8703da4ab6
4 changed files with 21 additions and 33 deletions
-2
View File
@@ -2,7 +2,6 @@ import { Terminal } from "../../../Terminal";
import { ScriptEditorRouteOptions, Page } from "../../../ui/Router";
import { Router } from "../../../ui/GameRoot";
import { BaseServer } from "../../../Server/BaseServer";
import { CursorPositions } from "../../../ScriptEditor/CursorPositions";
import { ScriptFilePath, hasScriptExtension } from "../../../Paths/ScriptFilePath";
import { TextFilePath, hasTextExtension } from "../../../Paths/TextFilePath";
import { getGlobbedFileMap } from "../../../Paths/GlobbedFiles";
@@ -54,7 +53,6 @@ export function commonEditor(
const file = server.getContentFile(path);
const content = file ? file.content : isNs2(path) ? newNs2Template : "";
files.set(path, content);
if (content === newNs2Template) CursorPositions.saveCursor(path, { row: 3, column: 5 });
}
if (hasNs1) {
sendDeprecationNotice();