fix(editor): stabilize batch column selection

This commit is contained in:
skyler authored and GitHub committed 2026-08-30 10:35:34 +08:00
1 parent f664918e95
commit 143be57d41
5 files changed
+110 -15

No files matched your search

@@ -120,9 +120,9 @@ describe("QueryEditor batch column selection", () => {
const tabEnd = source.indexOf("\n}\n\nfunction clearPendingCompletionTab", tabStart);
expect(source).toContain("function applySelectedBatchColumnSelection");
expect(source.slice(handleEnterStart, handleEnterEnd)).toContain("if (applySelectedBatchColumnSelection(view)) return true;");
expect(source.slice(handleEnterStart, handleEnterEnd)).toContain("if (isBatchColumnSelectionCompletionActive(codeMirrorCompletionStatus?.(view.state) ?? null) && applySelectedBatchColumnSelection(view)) return true;");
expect(source.slice(handleEnterStart, handleEnterEnd)).toContain("if (codeMirrorAcceptCompletion?.(view)) return true;");
expect(source.slice(tabStart, tabEnd)).toContain("if (applySelectedBatchColumnSelection(view)) return true;");
expect(source.slice(tabStart, tabEnd)).toContain("if (isBatchColumnSelectionCompletionActive(completionStatus) && applySelectedBatchColumnSelection(view)) return true;");
expect(source).toContain("defaultKeymap: false");
expect(source).toContain('{ key: "ArrowDown", run: (view) => moveCompletion(view, true) }');
expect(source).toContain('{ key: "ArrowUp", run: (view) => moveCompletion(view, false) }');