From a7597cac4aec08e445aec01a64333e65dc14e85e Mon Sep 17 00:00:00 2001 From: salexdv Date: Wed, 17 Aug 2022 12:09:28 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=20=D1=81=D1=82=D0=B8=D0=BB=D1=8F=20=D0=BF=D0=BE=20?= =?UTF-8?q?=D1=83=D0=BC=D0=BE=D0=BB=D1=87=D0=B0=D0=BD=D0=B8=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/editor.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/editor.js b/src/editor.js index ebaee1d..e15c170 100644 --- a/src/editor.js +++ b/src/editor.js @@ -669,6 +669,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit editor.getOriginalEditor().onDidChangeCursorPosition(e => diffEditorOnDidChangeCursorPosition(e)); editor.getModifiedEditor().onDidLayoutChange(e => diffEditorOnDidLayoutChange(e)); editor.getOriginalEditor().onDidLayoutChange(e => diffEditorOnDidLayoutChange(e)); + setDefaultStyle(); } else { @@ -940,6 +941,12 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit } + setLetterSpacing = function(letterSpacing) { + + editor.updateOptions({letterSpacing: letterSpacing}); + + } + renderWhitespace = function(enabled) { let mode = enabled ? 'all' : 'none'; @@ -1384,6 +1391,15 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit } + setDefaultStyle = function() { + + setFontFamily("Courier New"); + setFontSize(14); + setLineHeight(16); + setLetterSpacing(0); + + } + generateEventWithSuggestData = function(eventName, trigger, row, suggestRows = []) { let bsl = new bslHelper(editor.getModel(), editor.getPosition()); @@ -1460,6 +1476,8 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit changeCommandKeybinding('editor.action.deleteLines', monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_L); changeCommandKeybinding('editor.action.selectToBracket', monaco.KeyMod.Shift | monaco.KeyMod.Alt | monaco.KeyCode.KEY_B); + setDefaultStyle(); + } function registerCodeLensProviders() {