Fix cursor movement using Ctrl-left/right with Emacs key bindings in "mark mode"

This commit is contained in:
Jonatan Heyman 2023-12-05 17:45:51 +01:00
parent 4c910c6872
commit c049fc5f2a

View File

@ -67,12 +67,12 @@ export function emacsKeymap(editor) {
["Ctrl-Shift--", undo], ["Ctrl-Shift--", undo],
["Ctrl-.", redo], ["Ctrl-.", redo],
["Ctrl-g", emacsCancel], ["Ctrl-g", emacsCancel],
{key:"Ctrl-ArrowLeft", run:cursorGroupLeft, shift:selectGroupLeft},
{key:"Ctrl-ArrowRight", run:cursorGroupRight, shift:selectGroupRight},
["ArrowLeft", emacsMoveCommand(cursorCharLeft, selectCharLeft)], ["ArrowLeft", emacsMoveCommand(cursorCharLeft, selectCharLeft)],
["ArrowRight", emacsMoveCommand(cursorCharRight, selectCharRight)], ["ArrowRight", emacsMoveCommand(cursorCharRight, selectCharRight)],
["ArrowUp", emacsMoveCommand(cursorLineUp, selectLineUp)], ["ArrowUp", emacsMoveCommand(cursorLineUp, selectLineUp)],
["ArrowDown", emacsMoveCommand(cursorLineDown, selectLineDown)], ["ArrowDown", emacsMoveCommand(cursorLineDown, selectLineDown)],
["Ctrl-ArrowLeft", emacsMoveCommand(cursorGroupLeft, selectGroupLeft)],
["Ctrl-ArrowRight", emacsMoveCommand(cursorGroupRight, selectGroupRight)],
["Ctrl-d", deleteCharForward], ["Ctrl-d", deleteCharForward],
["Ctrl-h", deleteCharBackward], ["Ctrl-h", deleteCharBackward],