1
0
mirror of https://github.com/salexdv/bsl_console.git synced 2024-11-24 08:33:29 +02:00

Доработка выделения и перетаскивания с зажатым CTRL #290

This commit is contained in:
salexdv 2022-09-14 12:29:36 +03:00
parent 539adf6cc2
commit 3b7f15bbbf

View File

@ -1726,8 +1726,12 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
let target = editor.getModel().getWordAtPosition(position); let target = editor.getModel().getWordAtPosition(position);
if (target) if (target) {
setSelection(position.lineNumber, target.startColumn, position.lineNumber, target.endColumn) let current_selection = editor.getSelection();
let target_selection = new monaco.Range(position.lineNumber, target.startColumn, position.lineNumber, target.endColumn);
if (!current_selection.containsRange(target_selection))
setSelection(position.lineNumber, target.startColumn, position.lineNumber, target.endColumn)
}
} }