fix shortcuts in foldall and unfoldall functions

This commit is contained in:
Víctor Losada Hernández
2026-10-21 18:33:52 +02:00
parent c0943cdfbc
commit 554374dbf9
2 changed files with 31 additions and 25 deletions
@@ -215,13 +215,15 @@ const newBreak = (type)=>(view)=>forEachSelection(view, (state, from, to, select
};
});
export const generalKeymap = Prec.high(keymap.of([
export const generalKeymap = (foldAll, unfoldAll) => Prec.high(keymap.of([
{ key: 'Tab', run: insertTab },
{ key: 'Shift-Tab', run: indentLess },
{ key: 'Mod-z', run: undo }, //it may be unnecessary
{ key: 'Mod-Shift-z', run: redo },
{ key: 'Mod-y', run: redo }, //user asked, so double keybind
{ key: 'Mod-d', run: deleteLine }, //annoyingly overrides "selectNextOccurrence" because users asked
{ key: 'Mod-Shift-[', run: foldAll },
{ key: 'Mod-Shift-]', run: unfoldAll },
]));
export const cssKeymap = Prec.highest(keymap.of([