Skip to content

Commit 31d5e42

Browse files
committed
Merge branch 'fix-shift-enter' of https://github.com/paypay/quickwit-datasource into publish
2 parents e3b1429 + 960ce68 commit 31d5e42

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/LuceneQueryEditor.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useRef, useCallback } from "react";
22
import { css } from "@emotion/css";
33

44

5-
import CodeMirror, { ReactCodeMirrorRef } from '@uiw/react-codemirror';
5+
import CodeMirror, { Prec, ReactCodeMirrorRef } from '@uiw/react-codemirror';
66
import { keymap } from '@codemirror/view';
77
import { linter, Diagnostic, lintGutter } from "@codemirror/lint"
88
import { autocompletion, CompletionContext, startCompletion } from "@codemirror/autocomplete"
@@ -58,7 +58,7 @@ export function LuceneQueryEditor(props: LuceneQueryEditorProps){
5858
maxRenderedOptions: 30,
5959
})
6060

61-
const myKeymap = keymap.of([
61+
const myKeymap = Prec.highest(keymap.of([
6262
{
6363
key: 'Shift-Enter',
6464
run: (view) => {
@@ -72,7 +72,7 @@ export function LuceneQueryEditor(props: LuceneQueryEditorProps){
7272
return startCompletion(view);
7373
}
7474
},
75-
]);
75+
]));
7676

7777
return (<CodeMirror
7878
ref={editorRef}

0 commit comments

Comments
 (0)