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

Merge pull request #298 from tormozit/develop

Develop
This commit is contained in:
Alexander Shkuraev 2022-11-05 16:09:07 +03:00 committed by GitHub
commit 395a39e53c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1121,7 +1121,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
setOption = function (optionName, optionValue) {
setTimeout(() => {
// setTimeout(() => { // Асинхронное выполнение не совместимо со старым API и рождает много скрытых проблем https://github.com/salexdv/bsl_console/issues/297
editor[optionName] = optionValue;
editor_options[optionName] = optionValue;
@ -1138,7 +1138,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
if (optionName == 'generateSuggestActivationEvent')
startStopSuggestActivationObserver();
}, 10);
// }, 10);
}
@ -1818,8 +1818,9 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
// #region non-public functions
function getLineNumber(originalLineNumber) {
if (originalLineNumber < lineNumbersDedocrations.length)
return lineNumbersDedocrations[originalLineNumber] + ' ' + originalLineNumber;
// Исправлена потеря первой декорации https://github.com/salexdv/bsl_console/issues/296#issuecomment-1303625104
if (originalLineNumber <= lineNumbersDedocrations.length)
return lineNumbersDedocrations[originalLineNumber - 1] + ' ' + originalLineNumber;
return originalLineNumber;