diff --git a/src/editor.js b/src/editor.js index fb8dd40..16548aa 100644 --- a/src/editor.js +++ b/src/editor.js @@ -9,6 +9,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit generateModificationEvent = false; readOnlyMode = false; queryMode = false; + version1C = ''; contextActions = []; sendEvent = function(eventName, eventParams) { @@ -147,7 +148,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit return bsl.findText(string); } - init = function(version1C) { + initContextMenuActions = function() { contextActions.forEach(action => { action.dispose(); @@ -173,6 +174,13 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit } + init = function(version) { + + version1C = version; + initContextMenuActions(); + + } + enableQuickSuggestions = function (enabled) { editor.updateOptions({ quickSuggestions: enabled }); @@ -218,6 +226,8 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit else monaco.editor.setModelLanguage(editor.getModel(), "bsl"); + initContextMenuActions(); + } editor = undefined;