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

Ошибка отображения виджета изменений fix #172

This commit is contained in:
salexdv 2021-06-07 08:18:14 +03:00
parent 8966112d07
commit c960271190

View File

@ -2067,6 +2067,14 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
let element = e.target.element;
let line_number = e.target.position.lineNumber;
let reveal_line = false;
if (line_number == getLineCount()) {
line_number--;
reveal_line = true;
}
let class_name = 'new-block';
if (element.classList.contains('diff-changed'))
@ -2175,7 +2183,10 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
setTimeout(() => {
inlineDiffEditor.revealLineInCenter(line_number);
}, 10)
}, 10);
if (reveal_line)
editor.revealLine(line_number + 1);
}, 10);