EDITOR: changed editor tabs to have their own editor mode (#1372)

This commit is contained in:
G4mingJon4s
2024-06-13 04:19:40 +02:00
committed by GitHub
parent 805ca06922
commit bec6e82d7f
11 changed files with 34 additions and 18 deletions
+2 -1
View File
@@ -24,6 +24,7 @@ import {
root,
} from "../../Paths/Directory";
import { isMember } from "../../utils/EnumHelper";
import { Settings } from "../../Settings/Settings";
export function ls(args: (string | number | boolean)[], server: BaseServer): void {
interface LSFlags {
@@ -138,7 +139,7 @@ export function ls(args: (string | number | boolean)[], server: BaseServer): voi
content = server.scripts.get(fullPath)?.content ?? "";
}
const files = new Map<ContentFilePath, string>();
const options = { hostname: server.hostname };
const options = { hostname: server.hostname, vim: Settings.MonacoDefaultToVim };
files.set(fullPath, content);
Router.toPage(Page.ScriptEditor, { files, options });
}
+1 -1
View File
@@ -3,5 +3,5 @@ import { BaseServer } from "../../Server/BaseServer";
import { commonEditor } from "./common/editor";
export function nano(args: (string | number | boolean)[], server: BaseServer): void {
return commonEditor("nano", { args, server });
return commonEditor("nano", { args, server }, { vim: false });
}