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