1
0
mirror of https://github.com/salexdv/bsl_console.git synced 2025-09-16 09:06:17 +02:00

Возврат к месту перехода на объявление (CTRL+-)

This commit is contained in:
salexdv
2023-12-06 19:55:58 +03:00
parent 5f2ec0f36d
commit 21df904f54
2 changed files with 16 additions and 0 deletions

View File

@@ -7904,6 +7904,9 @@ class bslHelper {
this.generateDefinitionEvent();
if (location && !ctrlPressed)
editor.definitionBreadcrumbs.push(this.position);
}
return location;
@@ -8007,6 +8010,9 @@ class bslHelper {
else
location = this.getQueryTempTableDefinition();
if (location && !ctrlPressed)
editor.definitionBreadcrumbs.push(this.position);
}
return location;

View File

@@ -1722,6 +1722,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
contextMenuEnabled = editor.getRawOptions().contextmenu;
editor.originalText = '';
editor.definitionBreadcrumbs = [];
}
@@ -2682,6 +2683,15 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
}
}
if (e.ctrlKey && e.keyCode == 83) {
e.preventDefault();
if (editor.definitionBreadcrumbs.length) {
let position = editor.definitionBreadcrumbs.pop();
editor.revealLineInCenter(position.lineNumber);
editor.setPosition(position);
}
}
if (e.altKey && e.keyCode == 87) {
// fix https://github.com/salexdv/bsl_console/issues/147
e.preventDefault();