mirror of
https://github.com/salexdv/bsl_console.git
synced 2024-11-24 08:33:29 +02:00
Доработка позиционирования при установке выделения #291
This commit is contained in:
parent
79f4917fa5
commit
1337db4d96
@ -432,7 +432,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
|
||||
if (endLineNumber <= getLineCount()) {
|
||||
let range = new monaco.Range(startLineNumber, startColumn, endLineNumber, endColumn);
|
||||
editor.setSelection(range);
|
||||
editor.revealLineInCenterIfOutsideViewport(startLineNumber);
|
||||
editor.revealPositionInCenterIfOutsideViewport(range.getEndPosition());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -446,7 +446,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
|
||||
let endPosition = editor.getModel().getPositionAt(end - 1);
|
||||
let range = new monaco.Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column);
|
||||
editor.setSelection(range);
|
||||
editor.revealPositionInCenterIfOutsideViewport(startPosition);
|
||||
editor.revealPositionInCenterIfOutsideViewport(endPosition);
|
||||
|
||||
return true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user