0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-05-07 16:38:38 +00:00

fix newpage keybind

This commit is contained in:
Víctor Losada Hernández
2026-04-20 21:54:11 +02:00
parent b41d4715e3
commit c856439191
@@ -1,6 +1,7 @@
/* eslint max-lines: ["error", { "max": 300 }] */
import { keymap } from '@codemirror/view';
import { undo, redo, indentMore } from '@codemirror/commands';
import { Prec } from '@codemirror/state';
const indentLess = (view)=>{
const { from, to } = view.state.selection.main;
@@ -193,7 +194,7 @@ export const generalKeymap = keymap.of([
{ key: 'Mod-Shift-z', run: redo },
]);
export const markdownKeymap = keymap.of([
export const markdownKeymap = Prec.highest(keymap.of([
//{ key: 'Shift-Tab', run: indentMore },
{ key: 'Shift-Tab', run: indentLess },
{ key: 'Mod-b', run: makeBold },
@@ -219,4 +220,4 @@ export const markdownKeymap = keymap.of([
{ key: 'Shift-Mod-Enter', run: newColumn },
{ key: 'Mod-Enter', run: newPage },
]);
]));