CodeMirror: +rectangularSelection and crosshairCursor as def extensions

These were default in CM5

To be added to the preferences panel once that's a thing (T359498)

Change-Id: I5a8b330444dd2dff0acfbd8e2d429a5b5273cd61
This commit is contained in:
MusikAnimal 2024-05-03 11:34:50 +03:00
parent 0e5fe342d9
commit 7856e62dea
3 changed files with 14 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,13 @@
import { EditorState, Extension } from '@codemirror/state';
import { EditorView, ViewUpdate, drawSelection, lineNumbers, highlightSpecialChars, keymap } from '@codemirror/view';
import {
EditorView,
drawSelection,
lineNumbers,
highlightSpecialChars,
keymap,
rectangularSelection,
crosshairCursor
} from '@codemirror/view';
import { defaultKeymap, history, historyKeymap } from '@codemirror/commands';
import { searchKeymap } from '@codemirror/search';
import { bracketMatching } from '@codemirror/language';
@ -94,7 +102,9 @@ class CodeMirror {
...searchKeymap
] ),
EditorState.allowMultipleSelections.of( true ),
drawSelection()
drawSelection(),
rectangularSelection(),
crosshairCursor()
];
// Add extensions relevant to editing (not read-only).