fix(editor): guard long native selections on macOS
This commit is contained in:
3 files changed
+494
-40
No files matched your search
@@ -57,7 +57,7 @@ import { createColumnReferencePayload, tableReferenceInsertText } from "@/lib/ed
|
||||
import { clearRememberedFocusedQueryEditorView, focusedQueryEditorView, queryEditorInsertContext, registerQueryEditorInsertContext, rememberFocusedQueryEditorView, unregisterQueryEditorInsertContext } from "@/lib/editor/focusedQueryEditorView";
|
||||
import { loadObjectMetadataFacet } from "@/lib/metadata/objectMetadataCache";
|
||||
import { structurePeekPanelId } from "@/lib/editor/structurePeekPanel";
|
||||
import { parkEditorNativeSelection, type EditorNativeSelectionPark } from "@/lib/editor/queryEditorNativeSelection";
|
||||
import { createQueryEditorNativeSelectionGuard, parkEditorNativeSelection, type EditorNativeSelectionPark } from "@/lib/editor/queryEditorNativeSelection";
|
||||
import CodeSnapshotDialog from "@/components/codeSnapshot/CodeSnapshotDialog.vue";
|
||||
import QueryEditorContextMenu, { type QueryEditorContextMenuState, type QueryEditorContextMenuActions } from "./QueryEditorContextMenu.vue";
|
||||
|
||||
@@ -134,6 +134,7 @@ import { supportsQueryEditorBlockComments, supportsSqlInListPaste } from "@/lib/
|
||||
import { queryContextObjectRoute, queryTableCandidateAtSqlPosition, resolveQueryContextCandidateDatabase, resolveQueryContextObjectTarget, type QueryContextObjectAction } from "@/lib/sql/queryCursorTableTarget";
|
||||
import * as api from "@/lib/backend/api";
|
||||
import { isTauriRuntime } from "@/lib/backend/tauriRuntime";
|
||||
import { isMacOS } from "@/lib/backend/platform";
|
||||
import { resolveSqlDialectId } from "@/lib/sql/semantic/dialect";
|
||||
import type { SqlCompletionColumn, SqlCompletionContext, SqlCompletionReferencedTable } from "@/lib/sql/sqlCompletion";
|
||||
|
||||
@@ -1929,6 +1930,7 @@ const codeMirrorLifecycle = useQueryEditorCodeMirror({
|
||||
// keystroke maps the boundary view to the new doc before any lineMarker
|
||||
// callback reads it, otherwise the gutter would trigger a full parse.
|
||||
statementBoundariesTrackingPlugin,
|
||||
createQueryEditorNativeSelectionGuard(ViewPlugin, { enabled: isTauriRuntime() && isMacOS(), inputHandler: EditorView.inputHandler, finalizeClipboardText: (text) => clipboardLineEndings(text) }),
|
||||
initializedRuntime.runGutterComp.of(runStatementGutterExtension()),
|
||||
initializedRuntime.lineNumbersComp.of(lineNumbersExtension(initialSettings.showLineNumbers)),
|
||||
createQueryEditorLineNumberAlignmentExtension(ViewPlugin),
|
||||
|
||||
Reference in new issue
Block a user