fix(editor): Support backspacing with modifier key (#5845)

Support backspacing with modifier key
This commit is contained in:
Iván Ovejero 2023-03-31 09:19:49 +02:00 committed by GitHub
parent 1eba4788f2
commit 11692c55f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,6 +15,7 @@ import {
insertNewlineAndIndent, insertNewlineAndIndent,
toggleComment, toggleComment,
redo, redo,
deleteCharBackward,
} from '@codemirror/commands'; } from '@codemirror/commands';
import { lintGutter } from '@codemirror/lint'; import { lintGutter } from '@codemirror/lint';
@ -38,6 +39,7 @@ export const baseExtensions = [
{ key: 'Enter', run: acceptCompletion }, { key: 'Enter', run: acceptCompletion },
{ key: 'Mod-/', run: toggleComment }, { key: 'Mod-/', run: toggleComment },
{ key: 'Mod-Shift-z', run: redo }, { key: 'Mod-Shift-z', run: redo },
{ key: 'Backspace', run: deleteCharBackward, shift: deleteCharBackward },
indentWithTab, indentWithTab,
]), ]),
EditorView.lineWrapping, EditorView.lineWrapping,