diff --git a/src/editor.js b/src/editor.js index 73f1447..f9f21d2 100644 --- a/src/editor.js +++ b/src/editor.js @@ -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;