diff --git a/apps/desktop/src/components/editor/EditorSettingsDialog.vue b/apps/desktop/src/components/editor/EditorSettingsDialog.vue
index 525200f9da..3c14789318 100644
--- a/apps/desktop/src/components/editor/EditorSettingsDialog.vue
+++ b/apps/desktop/src/components/editor/EditorSettingsDialog.vue
@@ -676,6 +676,7 @@ const executeModeDescription = computed(() => translateWithExecuteShortcut("sett
const editExecuteAllOnBlankLine = ref(settingsStore.editorSettings.executeAllOnBlankLine);
const editShowExecutionTargetPicker = ref(settingsStore.editorSettings.showExecutionTargetPicker);
const editShowStatementRunButtons = ref(settingsStore.editorSettings.showStatementRunButtons);
+const editLocateCursorOnGutterExecute = ref(settingsStore.editorSettings.locateCursorOnGutterExecute);
const editShowLineNumbers = ref(settingsStore.editorSettings.showLineNumbers);
const editShowCurrentStatementFrame = ref(settingsStore.editorSettings.showCurrentStatementFrame);
const editShowInsertValueHints = ref(settingsStore.editorSettings.showInsertValueHints);
@@ -1076,6 +1077,7 @@ function currentEditorSettingsDraft(): EditorSettingsDraft {
executeAllOnBlankLine: editExecuteAllOnBlankLine.value,
showExecutionTargetPicker: editShowExecutionTargetPicker.value,
showStatementRunButtons: editShowStatementRunButtons.value,
+ locateCursorOnGutterExecute: editLocateCursorOnGutterExecute.value,
showLineNumbers: editShowLineNumbers.value,
showCurrentStatementFrame: editShowCurrentStatementFrame.value,
showInsertValueHints: editShowInsertValueHints.value,
@@ -1758,6 +1760,7 @@ function syncEditorSettingsDraftFromStore() {
editExecuteAllOnBlankLine.value = settingsStore.editorSettings.executeAllOnBlankLine;
editShowExecutionTargetPicker.value = settingsStore.editorSettings.showExecutionTargetPicker;
editShowStatementRunButtons.value = settingsStore.editorSettings.showStatementRunButtons;
+ editLocateCursorOnGutterExecute.value = settingsStore.editorSettings.locateCursorOnGutterExecute;
editShowLineNumbers.value = settingsStore.editorSettings.showLineNumbers;
editShowCurrentStatementFrame.value = settingsStore.editorSettings.showCurrentStatementFrame;
editShowInsertValueHints.value = settingsStore.editorSettings.showInsertValueHints;
@@ -1919,6 +1922,7 @@ const editorSettingsDraftRefs: EditorSettingsDraftRefMap = {
executeAllOnBlankLine: editExecuteAllOnBlankLine,
showExecutionTargetPicker: editShowExecutionTargetPicker,
showStatementRunButtons: editShowStatementRunButtons,
+ locateCursorOnGutterExecute: editLocateCursorOnGutterExecute,
showLineNumbers: editShowLineNumbers,
showCurrentStatementFrame: editShowCurrentStatementFrame,
showInsertValueHints: editShowInsertValueHints,
@@ -2456,6 +2460,7 @@ function resetDefaultsForTab(tab: SettingsCategory) {
editExecuteAllOnBlankLine.value = DEFAULT_EDITOR_SETTINGS.executeAllOnBlankLine;
editShowExecutionTargetPicker.value = DEFAULT_EDITOR_SETTINGS.showExecutionTargetPicker;
editShowStatementRunButtons.value = DEFAULT_EDITOR_SETTINGS.showStatementRunButtons;
+ editLocateCursorOnGutterExecute.value = DEFAULT_EDITOR_SETTINGS.locateCursorOnGutterExecute;
editShowLineNumbers.value = DEFAULT_EDITOR_SETTINGS.showLineNumbers;
editShowCurrentStatementFrame.value = DEFAULT_EDITOR_SETTINGS.showCurrentStatementFrame;
editShowInsertValueHints.value = DEFAULT_EDITOR_SETTINGS.showInsertValueHints;
@@ -2637,6 +2642,7 @@ function resetAllDefaults() {
editExecuteAllOnBlankLine.value = DEFAULT_EDITOR_SETTINGS.executeAllOnBlankLine;
editShowExecutionTargetPicker.value = DEFAULT_EDITOR_SETTINGS.showExecutionTargetPicker;
editShowStatementRunButtons.value = DEFAULT_EDITOR_SETTINGS.showStatementRunButtons;
+ editLocateCursorOnGutterExecute.value = DEFAULT_EDITOR_SETTINGS.locateCursorOnGutterExecute;
editShowLineNumbers.value = DEFAULT_EDITOR_SETTINGS.showLineNumbers;
editShowCurrentStatementFrame.value = DEFAULT_EDITOR_SETTINGS.showCurrentStatementFrame;
editShowInsertValueHints.value = DEFAULT_EDITOR_SETTINGS.showInsertValueHints;
@@ -6813,6 +6819,16 @@ onUnmounted(() => {
+
diff --git a/apps/desktop/src/components/editor/QueryEditor.vue b/apps/desktop/src/components/editor/QueryEditor.vue
index f55338f55f..baa06bbea0 100644
--- a/apps/desktop/src/components/editor/QueryEditor.vue
+++ b/apps/desktop/src/components/editor/QueryEditor.vue
@@ -1180,10 +1180,18 @@ function executeSqlStatementFromGutter(currentView: EditorViewType, line: { from
const selection = currentView.state.selection.main;
const hasSelectedSql = !selection.empty && currentView.state.sliceDoc(selection.from, selection.to).trim().length > 0;
const selectionOverlapsStatement = hasSelectedSql && selection.from < statementRange.to && statementRange.from < selection.to;
+ if (settingsStore.editorSettings.locateCursorOnGutterExecute && !selectionOverlapsStatement) {
+ currentView.dispatch({
+ selection: { anchor: statementRange.from, head: statementRange.from },
+ scrollIntoView: false,
+ userEvent: "select.pointer",
+ });
+ }
const executionSnapshot = selectionOverlapsStatement ? sqlExecutionSnapshotFromView(currentView) : sqlExecutionSnapshotForRange(currentView, statementRange);
emitExecutionRequest({ ...executionSnapshot, editorViewportRequestId });
- // 不主动聚焦编辑器,否则 CodeMirror 会把屏幕滚回之前的光标位置。
- // currentView.focus();
+ if (settingsStore.editorSettings.locateCursorOnGutterExecute) {
+ currentView.focus();
+ }
return true;
}
diff --git a/apps/desktop/src/i18n/locales/az.ts b/apps/desktop/src/i18n/locales/az.ts
index 80f18f6f11..e6bfa68b4c 100644
--- a/apps/desktop/src/i18n/locales/az.ts
+++ b/apps/desktop/src/i18n/locales/az.ts
@@ -7615,6 +7615,8 @@ export default withEnglishFallback({
showExecutionTargetPickerDescription: "Aktiv olduqda seçim etmədən işlətmək cari əmrlə bütün SQL arasında seçim etməyə imkan verir.",
showStatementRunButtons: "Soldakı işlətmə düymələrini göstər",
showStatementRunButtonsDescription: "SQL redaktorunun kənar zolağında hər əmr üçün işlətmə düymələrini göstər. Deaktiv olduqda da klaviatura qısayolları və kontekst menyusundan icra işləyir.",
+ locateCursorOnGutterExecute: "Kənar zolaqdan işlədildikdə kursoru əmrin əvvəlinə köçür",
+ locateCursorOnGutterExecuteDescription: "Redaktorun kənar zolağından SQL icra edildikdə kursoru əmrin əvvəlinə yerləşdirir və redaktoru fokuslayır.",
showLineNumbers: "Sətir nömrələrini göstər",
showLineNumbersDescription: "SQL redaktorunun kənar zolağında sətir nömrələrini göstər",
showCurrentStatementFrame: "Cari əmrin çərçivəsini göstər",
diff --git a/apps/desktop/src/i18n/locales/en.ts b/apps/desktop/src/i18n/locales/en.ts
index 3cd27ba7a6..37285fbead 100644
--- a/apps/desktop/src/i18n/locales/en.ts
+++ b/apps/desktop/src/i18n/locales/en.ts
@@ -8633,6 +8633,8 @@ export default {
showExecutionTargetPickerDescription: "When enabled, running without a selection lets you choose between the current statement and all SQL.",
showStatementRunButtons: "Show left-side run buttons",
showStatementRunButtonsDescription: "Show per-statement run buttons in the SQL editor gutter. Keyboard shortcuts and context menu execution still work when disabled.",
+ locateCursorOnGutterExecute: "Move cursor to statement start on gutter run",
+ locateCursorOnGutterExecuteDescription: "When executing SQL from the editor gutter, position the cursor at the beginning of the statement and focus the editor.",
showLineNumbers: "Show line numbers",
showLineNumbersDescription: "Show line numbers in the SQL editor gutter",
showCurrentStatementFrame: "Show current statement frame",
diff --git a/apps/desktop/src/i18n/locales/es.ts b/apps/desktop/src/i18n/locales/es.ts
index 5c174e932d..e7b90df5d0 100644
--- a/apps/desktop/src/i18n/locales/es.ts
+++ b/apps/desktop/src/i18n/locales/es.ts
@@ -7896,6 +7896,8 @@ export default withEnglishFallback({
showExecutionTargetPickerDescription: "Al activarlo, ejecutar sin selección permite elegir entre la sentencia actual y todo el SQL.",
showStatementRunButtons: "Mostrar botones de ejecución laterales",
showStatementRunButtonsDescription: "Muestra botones para ejecutar cada sentencia en el margen del editor SQL. Los atajos de teclado y el menú contextual seguirán funcionando al desactivarlo.",
+ locateCursorOnGutterExecute: "Mover el cursor al inicio de la sentencia al ejecutar desde el margen",
+ locateCursorOnGutterExecuteDescription: "Al ejecutar SQL desde el margen del editor, coloca el cursor al inicio de la sentencia y enfoca el editor.",
showLineNumbers: "Mostrar números de línea",
showLineNumbersDescription: "Mostrar números de línea en el margen del editor SQL",
showCurrentStatementFrame: "Mostrar marco de la sentencia actual",
diff --git a/apps/desktop/src/i18n/locales/id.ts b/apps/desktop/src/i18n/locales/id.ts
index 4e53472f37..d644923fa6 100644
--- a/apps/desktop/src/i18n/locales/id.ts
+++ b/apps/desktop/src/i18n/locales/id.ts
@@ -8410,6 +8410,8 @@ export default withEnglishFallback({
showExecutionTargetPickerDescription: "Jika diaktifkan, menjalankan tanpa seleksi akan memungkinkan Anda memilih antara pernyataan saat ini dan semua SQL.",
showStatementRunButtons: "Tampilkan tombol jalankan di sisi kiri",
showStatementRunButtonsDescription: "Tampilkan tombol jalankan per pernyataan pada gutter editor SQL. Pintasan keyboard dan eksekusi melalui menu konteks tetap berfungsi saat dinonaktifkan.",
+ locateCursorOnGutterExecute: "Pindahkan kursor ke awal pernyataan saat dijalankan dari gutter",
+ locateCursorOnGutterExecuteDescription: "Saat menjalankan SQL dari gutter editor, posisikan kursor di awal pernyataan dan fokuskan editor.",
showLineNumbers: "Tampilkan nomor baris",
showLineNumbersDescription: "Tampilkan nomor baris pada gutter editor SQL",
showCurrentStatementFrame: "Tampilkan bingkai pernyataan saat ini",
diff --git a/apps/desktop/src/i18n/locales/it.ts b/apps/desktop/src/i18n/locales/it.ts
index afc55b1147..f2b2b8699d 100644
--- a/apps/desktop/src/i18n/locales/it.ts
+++ b/apps/desktop/src/i18n/locales/it.ts
@@ -7661,6 +7661,8 @@ export default withEnglishFallback({
showExecutionTargetPickerDescription: "Se attivo, l'esecuzione senza selezione permette di scegliere tra istruzione corrente e tutto l'SQL.",
showStatementRunButtons: "Mostra pulsanti di esecuzione laterali",
showStatementRunButtonsDescription: "Mostra nel margine dell'editor SQL i pulsanti per eseguire ogni istruzione. Scorciatoie da tastiera e menu contestuale continuano a funzionare quando disattivati.",
+ locateCursorOnGutterExecute: "Sposta il cursore all'inizio dell'istruzione all'esecuzione dal margine",
+ locateCursorOnGutterExecuteDescription: "Quando si esegue SQL dal margine dell'editor, posiziona il cursore all'inizio dell'istruzione e mette a fuoco l'editor.",
showLineNumbers: "Mostra numeri di riga",
showLineNumbersDescription: "Mostra i numeri di riga nel margine dell'editor SQL",
showCurrentStatementFrame: "Mostra cornice istruzione corrente",
diff --git a/apps/desktop/src/i18n/locales/ja.ts b/apps/desktop/src/i18n/locales/ja.ts
index fd116a703a..9bbb6b4287 100644
--- a/apps/desktop/src/i18n/locales/ja.ts
+++ b/apps/desktop/src/i18n/locales/ja.ts
@@ -7675,6 +7675,8 @@ export default withEnglishFallback({
showExecutionTargetPickerDescription: "有効にすると、選択なしで実行するときに現在の文とすべてのSQLを一時的に選べます。",
showStatementRunButtons: "左側の実行ボタンを表示",
showStatementRunButtonsDescription: "SQLエディターのガターに文ごとの実行ボタンを表示します。無効にしてもキーボードショートカットとコンテキストメニューからの実行は引き続き使えます。",
+ locateCursorOnGutterExecute: "ガター実行時にカーソルを文の先頭へ移動",
+ locateCursorOnGutterExecuteDescription: "エディターのガターからSQLを実行した際、カーソルを実行した文の先頭に移動しエディターをフォーカスします。",
showLineNumbers: "行番号を表示",
showLineNumbersDescription: "SQLエディターのガターに行番号を表示します",
showCurrentStatementFrame: "現在の文の枠線を表示",
diff --git a/apps/desktop/src/i18n/locales/ko.ts b/apps/desktop/src/i18n/locales/ko.ts
index 5c8725734e..7596669c50 100644
--- a/apps/desktop/src/i18n/locales/ko.ts
+++ b/apps/desktop/src/i18n/locales/ko.ts
@@ -7519,6 +7519,8 @@ export default withEnglishFallback({
showExecutionTargetPickerDescription: "활성화하면 선택 없이 실행할 때 현재 구문과 전체 SQL 중에서 선택할 수 있습니다.",
showStatementRunButtons: "왼쪽 실행 버튼 표시",
showStatementRunButtonsDescription: "SQL 편집기 여백에 구문별 실행 버튼을 표시합니다. 비활성화해도 키보드 단축키와 컨텍스트 메뉴 실행은 계속 작동합니다.",
+ locateCursorOnGutterExecute: "여백 실행 시 커서를 구문 시작으로 이동",
+ locateCursorOnGutterExecuteDescription: "편집기 여백에서 SQL을 실행할 때 커서를 해당 구문의 시작 위치로 이동하고 편집기에 포커스를 맞춥니다.",
showLineNumbers: "줄 번호 표시",
showLineNumbersDescription: "SQL 편집기 여백에 줄 번호를 표시합니다",
showCurrentStatementFrame: "현재 구문 프레임 표시",
diff --git a/apps/desktop/src/i18n/locales/pt-BR.ts b/apps/desktop/src/i18n/locales/pt-BR.ts
index 3426ca2f3b..52dd44ae58 100644
--- a/apps/desktop/src/i18n/locales/pt-BR.ts
+++ b/apps/desktop/src/i18n/locales/pt-BR.ts
@@ -7662,6 +7662,8 @@ export default withEnglishFallback({
showExecutionTargetPickerDescription: "Quando ativado, executar sem seleção permite escolher entre a instrução atual e todo o SQL.",
showStatementRunButtons: "Mostrar botões de execução laterais",
showStatementRunButtonsDescription: "Mostra botões para executar cada instrução na margem do editor SQL. Atalhos de teclado e execução pelo menu de contexto continuam funcionando quando desativado.",
+ locateCursorOnGutterExecute: "Mover cursor para o início da instrução ao executar pela margem",
+ locateCursorOnGutterExecuteDescription: "Ao executar SQL pela margem do editor, posiciona o cursor no início da instrução e foca o editor.",
showLineNumbers: "Mostrar números de linha",
showLineNumbersDescription: "Mostrar números de linha na margem do editor SQL",
showCurrentStatementFrame: "Mostrar moldura da instrução atual",
diff --git a/apps/desktop/src/i18n/locales/ru.ts b/apps/desktop/src/i18n/locales/ru.ts
index 3a2f877844..71c1e45f24 100644
--- a/apps/desktop/src/i18n/locales/ru.ts
+++ b/apps/desktop/src/i18n/locales/ru.ts
@@ -8939,6 +8939,8 @@ export default withEnglishFallback({
showExecutionTargetPickerDescription: "Если включено, при запуске без выделения можно выбрать между текущим оператором и всем SQL.",
showStatementRunButtons: "Показывать кнопки запуска слева",
showStatementRunButtonsDescription: "Показывать кнопки запуска для каждого оператора на полосе SQL-редактора. Горячие клавиши и выполнение из контекстного меню работают и при отключении.",
+ locateCursorOnGutterExecute: "Перемещать курсор в начало оператора при запуске с полосы",
+ locateCursorOnGutterExecuteDescription: "При выполнении SQL с полосы редактора перемещать курсор в начало оператора и фокусировать редактор.",
showLineNumbers: "Показывать номера строк",
showLineNumbersDescription: "Показывать номера строк на полосе SQL-редактора",
showCurrentStatementFrame: "Показывать рамку текущего оператора",
diff --git a/apps/desktop/src/i18n/locales/tr.ts b/apps/desktop/src/i18n/locales/tr.ts
index a6ad0ba9d4..957876db47 100644
--- a/apps/desktop/src/i18n/locales/tr.ts
+++ b/apps/desktop/src/i18n/locales/tr.ts
@@ -7513,6 +7513,8 @@ export default withEnglishFallback({
showExecutionTargetPickerDescription: "Etkinleştirildiğinde, seçim yapmadan çalıştırmak geçerli ifade ile tüm SQL arasında seçim yapmanızı sağlar.",
showStatementRunButtons: "Soldaki çalıştırma düğmelerini göster",
showStatementRunButtonsDescription: "SQL düzenleyici kenar çubuğunda ifade başına çalıştırma düğmelerini göster. Kapatıldığında klavye kısayolları ve bağlam menüsünden çalıştırma yine çalışır.",
+ locateCursorOnGutterExecute: "Kenar çubuğundan çalıştırmada imleci ifade başına taşı",
+ locateCursorOnGutterExecuteDescription: "Düzenleyici kenar çubuğundan SQL çalıştırıldığında imleci ifadenin başına konumlandırır ve düzenleyiciye odaklanır.",
showLineNumbers: "Satır numaralarını göster",
showLineNumbersDescription: "SQL düzenleyici kenar çubuğunda satır numaralarını göster",
showCurrentStatementFrame: "Geçerli ifade çerçevesini göster",
diff --git a/apps/desktop/src/i18n/locales/zh-CN.ts b/apps/desktop/src/i18n/locales/zh-CN.ts
index eef0ab87a5..3b339bd411 100644
--- a/apps/desktop/src/i18n/locales/zh-CN.ts
+++ b/apps/desktop/src/i18n/locales/zh-CN.ts
@@ -8616,6 +8616,8 @@ export default withEnglishFallback({
showExecutionTargetPickerDescription: "开启后,无选区执行时可在当前语句和全部 SQL 之间临时选择。",
showStatementRunButtons: "显示左侧执行按钮",
showStatementRunButtonsDescription: "在 SQL 编辑器左侧显示按语句执行的快捷按钮。关闭后仍可通过快捷键和右键菜单执行。",
+ locateCursorOnGutterExecute: "左侧执行后光标定位到语句首部",
+ locateCursorOnGutterExecuteDescription: "通过编辑器左侧执行按钮运行 SQL 时,将光标移动到该语句的起始位置并聚焦编辑器。",
showLineNumbers: "显示行号",
showLineNumbersDescription: "在 SQL 编辑器左侧显示行号",
showCurrentStatementFrame: "显示当前语句外框线",
diff --git a/apps/desktop/src/i18n/locales/zh-TW.ts b/apps/desktop/src/i18n/locales/zh-TW.ts
index 471e7eb25d..4ee2197900 100644
--- a/apps/desktop/src/i18n/locales/zh-TW.ts
+++ b/apps/desktop/src/i18n/locales/zh-TW.ts
@@ -7008,6 +7008,8 @@ export default withEnglishFallback({
showExecutionTargetPickerDescription: "啟用後,無選取執行時可在目前語句與全部 SQL 之間臨時選擇。",
showStatementRunButtons: "顯示左側執行按鈕",
showStatementRunButtonsDescription: "在 SQL 編輯器左側顯示按語句執行的快捷按鈕。關閉後仍可透過快捷鍵和右鍵選單執行。",
+ locateCursorOnGutterExecute: "左側執行後游標定位到語句首部",
+ locateCursorOnGutterExecuteDescription: "透過編輯器左側執行按鈕運行 SQL 時,將游標移動到該語句的起始位置並聚焦編輯器。",
showLineNumbers: "顯示行號",
showLineNumbersDescription: "在 SQL 編輯器左側顯示行號",
showCurrentStatementFrame: "顯示目前語句外框線",
diff --git a/apps/desktop/src/lib/__tests__/editor/queryEditorExecution.spec.ts b/apps/desktop/src/lib/__tests__/editor/queryEditorExecution.spec.ts
index 913b436368..5ab3191fac 100644
--- a/apps/desktop/src/lib/__tests__/editor/queryEditorExecution.spec.ts
+++ b/apps/desktop/src/lib/__tests__/editor/queryEditorExecution.spec.ts
@@ -13,6 +13,12 @@ describe("QueryEditor execution routing", () => {
it("snapshots pre-execution cursor visibility when execution viewport tracking starts", () => {
expect(queryEditorSource).toContain("beginExecution(cursorVisible)");
});
+
+ it("positions cursor at statement start and focuses editor on gutter execution when enabled", () => {
+ expect(queryEditorSource).toContain("if (settingsStore.editorSettings.locateCursorOnGutterExecute && !selectionOverlapsStatement)");
+ expect(queryEditorSource).toContain("selection: { anchor: statementRange.from, head: statementRange.from }");
+ expect(queryEditorSource).toContain("if (settingsStore.editorSettings.locateCursorOnGutterExecute) {\n currentView.focus();\n }");
+ });
});
describe("QueryEditor execution viewport ownership", () => {
diff --git a/apps/desktop/src/lib/settings/editorSettingsDraft.ts b/apps/desktop/src/lib/settings/editorSettingsDraft.ts
index 67c36cd450..b3a2c166ff 100644
--- a/apps/desktop/src/lib/settings/editorSettingsDraft.ts
+++ b/apps/desktop/src/lib/settings/editorSettingsDraft.ts
@@ -23,6 +23,7 @@ export const EDITOR_SETTINGS_DRAFT_KEYS = [
"executeAllOnBlankLine",
"showExecutionTargetPicker",
"showStatementRunButtons",
+ "locateCursorOnGutterExecute",
"showLineNumbers",
"showCurrentStatementFrame",
"showInsertValueHints",
diff --git a/apps/desktop/src/lib/settings/settingsSearch.ts b/apps/desktop/src/lib/settings/settingsSearch.ts
index 7815f1e74c..ee3815f958 100644
--- a/apps/desktop/src/lib/settings/settingsSearch.ts
+++ b/apps/desktop/src/lib/settings/settingsSearch.ts
@@ -136,6 +136,7 @@ export const SETTINGS_SEARCH_DEFINITIONS: readonly SettingsSearchDefinition[] =
{ id: "editor-execute-all-on-blank-line", category: "editor", titleKey: "settings.executeAllOnBlankLine", descriptionKey: "settings.executeAllOnBlankLineDescription", targetId: "editor" },
{ id: "editor-execution-target", category: "editor", titleKey: "settings.showExecutionTargetPicker", descriptionKey: "settings.showExecutionTargetPickerDescription", targetId: "editor" },
{ id: "editor-run-buttons", category: "editor", titleKey: "settings.showStatementRunButtons", descriptionKey: "settings.showStatementRunButtonsDescription", targetId: "editor" },
+ { id: "editor-locate-cursor-on-gutter-execute", category: "editor", titleKey: "settings.locateCursorOnGutterExecute", descriptionKey: "settings.locateCursorOnGutterExecuteDescription", targetId: "editor" },
{ id: "editor-line-numbers", category: "editor", titleKey: "settings.showLineNumbers", descriptionKey: "settings.showLineNumbersDescription", targetId: "editor" },
{ id: "editor-statement-frame", category: "editor", titleKey: "settings.showCurrentStatementFrame", descriptionKey: "settings.showCurrentStatementFrameDescription", targetId: "editor" },
{ id: "editor-value-hints", category: "editor", titleKey: "settings.showInsertValueHints", descriptionKey: "settings.showInsertValueHintsDescription", targetId: "editor" },
diff --git a/apps/desktop/src/lib/settings/settingsTransfer.ts b/apps/desktop/src/lib/settings/settingsTransfer.ts
index ba29092bb9..68a2738798 100644
--- a/apps/desktop/src/lib/settings/settingsTransfer.ts
+++ b/apps/desktop/src/lib/settings/settingsTransfer.ts
@@ -79,6 +79,7 @@ const SETTINGS_TRANSFER_CATEGORY_KEYS: Record, exist
: 0,
showExecutionTargetPicker: settings.showExecutionTargetPicker ?? DEFAULT_EDITOR_SETTINGS.showExecutionTargetPicker,
showStatementRunButtons: typeof settings.showStatementRunButtons === "boolean" ? settings.showStatementRunButtons : DEFAULT_EDITOR_SETTINGS.showStatementRunButtons,
+ locateCursorOnGutterExecute: typeof settings.locateCursorOnGutterExecute === "boolean" ? settings.locateCursorOnGutterExecute : DEFAULT_EDITOR_SETTINGS.locateCursorOnGutterExecute,
showLineNumbers: typeof settings.showLineNumbers === "boolean" ? settings.showLineNumbers : DEFAULT_EDITOR_SETTINGS.showLineNumbers,
showCurrentStatementFrame: typeof settings.showCurrentStatementFrame === "boolean" ? settings.showCurrentStatementFrame : DEFAULT_EDITOR_SETTINGS.showCurrentStatementFrame,
showInsertValueHints: typeof settings.showInsertValueHints === "boolean" ? settings.showInsertValueHints : DEFAULT_EDITOR_SETTINGS.showInsertValueHints,
@@ -2715,6 +2718,7 @@ export const useSettingsStore = defineStore("settings", () => {
if (partial.timeoutInheritanceMigrationVersion !== undefined) editorSettings.value.timeoutInheritanceMigrationVersion = Math.max(0, Math.floor(partial.timeoutInheritanceMigrationVersion));
if (partial.showExecutionTargetPicker !== undefined) editorSettings.value.showExecutionTargetPicker = partial.showExecutionTargetPicker;
if (partial.showStatementRunButtons !== undefined) editorSettings.value.showStatementRunButtons = partial.showStatementRunButtons === true;
+ if (partial.locateCursorOnGutterExecute !== undefined) editorSettings.value.locateCursorOnGutterExecute = partial.locateCursorOnGutterExecute === true;
if (partial.showLineNumbers !== undefined) editorSettings.value.showLineNumbers = partial.showLineNumbers === true;
if (partial.showCurrentStatementFrame !== undefined) editorSettings.value.showCurrentStatementFrame = partial.showCurrentStatementFrame === true;
if (partial.showInsertValueHints !== undefined) editorSettings.value.showInsertValueHints = partial.showInsertValueHints === true;