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

Выделение слова Ctrl+LClick closes #89

This commit is contained in:
salexdv 2021-05-05 09:02:07 +03:00
parent dd42a3ddda
commit 97328aaabf

View File

@ -944,6 +944,25 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
});
editor.onMouseDown(e => {
if (e.event.leftButton && e.event.ctrlKey) {
let position = e.target.position;
if (position) {
let target = editor.getModel().getWordAtPosition(position);
if (target)
setSelection(position.lineNumber, target.startColumn, position.lineNumber, target.endColumn)
}
}
});
editor.onDidScrollChange(e => {
if (e.scrollTop == 0) {