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

Проверка диапазона строк при установке границ выделения

This commit is contained in:
salexdv 2020-12-05 21:26:53 +03:00
parent 24455c49a1
commit e03c3b114b

View File

@ -286,8 +286,13 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
setSelection = function(startLineNumber, startColumn, endLineNumber, endColumn) {
let range = new monaco.Range(startLineNumber, startColumn, endLineNumber, endColumn);
editor.setSelection(range);
if (endLineNumber <= getLineCount()) {
let range = new monaco.Range(startLineNumber, startColumn, endLineNumber, endColumn);
editor.setSelection(range);
return true;
}
else
return false;
}