Skip to content

Commit

Permalink
Allow for multiple selection in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Jun 25, 2024
1 parent b2cf579 commit f68419e
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";

Check warning on line 25 in app/assets/javascripts/editor.ts

View check run for this annotation

Codecov / codecov/patch

app/assets/javascripts/editor.ts#L25

Added line #L25 was not covered by tests

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 f68419e

Please sign in to comment.