mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +00:00
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:
parent
7d3482f89e
commit
bdb8e008df
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue