This commit is contained in:
Zef Hemel
2023-01-23 18:52:17 +01:00
parent 53bf098579
commit e7728c2d2a
10 changed files with 102 additions and 27 deletions
+5 -1
View File
@@ -1,5 +1,5 @@
import { Editor } from "../editor.tsx";
import { EditorView, Transaction } from "../deps.ts";
import { EditorView, Transaction, Vim, vimGetCm } from "../deps.ts";
import { SysCallMapping } from "../../plugos/system.ts";
import { FilterOption } from "../../common/types.ts";
@@ -164,6 +164,10 @@ export function editorSyscalls(editor: Editor): SysCallMapping {
value,
});
},
"editor.vimEx": (_ctx, exCommand: string) => {
const cm = vimGetCm(editor.editorView!)!;
return Vim.handleEx(cm, exCommand);
},
};
return syscalls;