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

Возврат стандартных сниппетов и их очистка

This commit is contained in:
salexdv 2022-01-27 06:06:44 +03:00
parent f9709e14de
commit 21f8d5c576

View File

@ -35,6 +35,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
inlineDiffWidget = null;
events_queue = [];
editor_options = [];
snippets = {};
// #endregion
// #region public API
@ -1426,6 +1427,18 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
}
setDefaultSnippets = function() {
snippets = bslSnippets;
}
clearSnippets = function() {
snippets = {};
}
setMarkers = function (markersJSON) {
try {
@ -1575,6 +1588,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
createEditor(language.id, getCode(), 'bsl-white');
registerCodeLensProviders();
setDefaultSnippets();
contextMenuEnabled = editor.getRawOptions().contextmenu;
editor.originalText = '';