Skip to content

Commit

Permalink
Merge pull request #5640 from dodona-edu/enhance/multiple-selection
Browse files Browse the repository at this point in the history
Allow for multiple selection in editor
  • Loading branch information
jorg-vr authored Jun 25, 2024
2 parents b2cf579 + f68419e commit eb17964
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/assets/javascripts/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
lineNumbers
} from "@codemirror/view";
import { tags } from "@lezer/highlight";
import { Extension } from "@codemirror/state";
import { EditorState, Extension } from "@codemirror/state";

declare type EditorEventHandler = (event: FocusEvent, view: EditorView) => boolean | void;
const tabCompletionKeyMap = [{ key: "Tab", run: acceptCompletion }];
Expand Down Expand Up @@ -127,6 +127,7 @@ const editorSetup = (() => [
bracketMatching(),
closeBrackets(),
highlightActiveLine(),
EditorState.allowMultipleSelections.of(true),
keymap.of([
...closeBracketsKeymap,
...defaultKeymap,
Expand Down

0 comments on commit eb17964

Please sign in to comment.