Add Fold: Toggle Fold command

This commit is contained in:
Zef Hemel
2023-06-17 09:01:32 +02:00
parent 5f1f02e8b9
commit eefd8a5245
5 changed files with 19 additions and 0 deletions
+4
View File
@@ -3,6 +3,7 @@ import {
EditorView,
foldAll,
foldCode,
toggleFold,
Transaction,
unfoldAll,
unfoldCode,
@@ -188,6 +189,9 @@ export function editorSyscalls(editor: Editor): SysCallMapping {
"editor.unfold": () => {
unfoldCode(editor.editorView!);
},
"editor.toggleFold": () => {
toggleFold(editor.editorView!);
},
"editor.foldAll": () => {
foldAll(editor.editorView!);
},