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

Расчет сворачиваемых блоков запроса по отступам #185

This commit is contained in:
salexdv 2022-09-06 16:26:16 +03:00
parent e6c94797d3
commit 79f4917fa5

View File

@ -320,6 +320,14 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
let isCompareMode = (editor.navi != undefined); let isCompareMode = (editor.navi != undefined);
queryMode = (mode == 'bsl_query');
DCSMode = (mode == 'dcs_query');
if (queryMode || DCSMode)
editor.updateOptions({ foldingStrategy: "indentation" });
else
editor.updateOptions({ foldingStrategy: "auto" });
if (isCompareMode) { if (isCompareMode) {
monaco.editor.setModelLanguage(editor.getModifiedEditor().getModel(), mode); monaco.editor.setModelLanguage(editor.getModifiedEditor().getModel(), mode);
monaco.editor.setModelLanguage(editor.getOriginalEditor().getModel(), mode); monaco.editor.setModelLanguage(editor.getOriginalEditor().getModel(), mode);
@ -328,9 +336,6 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
monaco.editor.setModelLanguage(editor.getModel(), mode); monaco.editor.setModelLanguage(editor.getModel(), mode);
} }
queryMode = (mode == 'bsl_query');
DCSMode = (mode == 'dcs_query');
let currentTheme = getCurrentThemeName(); let currentTheme = getCurrentThemeName();
setTheme(currentTheme); setTheme(currentTheme);