Merge "CodeMirror: add Ctrl+Shift+z as redo shortcut on Windows"

This commit is contained in:
jenkins-bot 2024-08-14 23:10:58 +00:00 committed by Gerrit Code Review
commit 2973880c28

View file

@ -3,6 +3,7 @@ const {
EditorView,
Extension,
Compartment,
KeyBinding,
ViewUpdate,
bracketMatching,
crosshairCursor,
@ -14,6 +15,7 @@ const {
keymap,
lineNumbers,
rectangularSelection,
redo,
searchKeymap
} = require( 'ext.CodeMirror.v6.lib' );
const CodeMirrorTextSelection = require( './codemirror.textSelection.js' );
@ -151,7 +153,13 @@ class CodeMirror {
}
} ) );
extensions.push( history() );
extensions.push( keymap.of( historyKeymap ) );
extensions.push( keymap.of(
historyKeymap.concat( /** @type {KeyBinding} */ {
win: 'Ctrl-Shift-z',
run: redo,
preventDefault: true
} )
) );
}
// Set to [] to disable everywhere, or null to enable everywhere