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

This worked in CM5, so we'll retain it in CM6 for those who have the
muscle memory.

Bug: T365072
Change-Id: I4d45ca03773b5140f3e39e15bfba664b577c055d
This commit is contained in:
MusikAnimal 2024-05-24 17:20:04 -04:00
parent 7d3482f89e
commit bdb8e008df

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' );
@ -126,7 +128,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