From 1337db4d9645e0f9e50532a77f7ce3a4de99141b Mon Sep 17 00:00:00 2001 From: salexdv Date: Mon, 12 Sep 2022 20:24:04 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BF=D0=BE=D0=B7=D0=B8=D1=86=D0=B8=D0=BE=D0=BD?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D1=83=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BA=D0=B5?= =?UTF-8?q?=20=D0=B2=D1=8B=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20#29?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor.js b/src/editor.js index 8948561..c7b26ce 100644 --- a/src/editor.js +++ b/src/editor.js @@ -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;