From 5066cddacc7c13d5bcf847a5eeb8ea6748643945 Mon Sep 17 00:00:00 2001 From: tormozit <11896251+tormozit@users.noreply.github.com> Date: Fri, 4 Nov 2022 17:44:47 +0300 Subject: [PATCH] Update editor.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Исправлена потеря первой декорации https://github.com/salexdv/bsl_console/issues/296#issuecomment-1303625104 --- src/editor.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/editor.js b/src/editor.js index 1cd40b0..f9f21d2 100644 --- a/src/editor.js +++ b/src/editor.js @@ -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;