This commit is contained in:
Zef Hemel
2022-12-21 16:08:51 +01:00
parent 3545d00d46
commit 52f0c14c78
9 changed files with 312 additions and 76 deletions
+4 -4
View File
@@ -139,14 +139,14 @@ export function editorSyscalls(editor: Editor): SysCallMapping {
_ctx,
message: string,
defaultValue = "",
): string | null => {
return prompt(message, defaultValue);
): Promise<string | undefined> => {
return editor.prompt(message, defaultValue);
},
"editor.confirm": (
_ctx,
message: string,
): boolean => {
return confirm(message);
): Promise<boolean> => {
return editor.confirm(message);
},
"editor.getUiOption": (_ctx, key: string): any => {
return (editor.viewState.uiOptions as any)[key];