From a99eb9365e108941a21d13b4c89da56b25cec089 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 24 Aug 2017 17:31:04 +0200 Subject: [PATCH] correctly set indentation preferences when changing languages --- www/code/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/code/main.js b/www/code/main.js index a7e6f1447..07f02e6a1 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -73,7 +73,7 @@ define([ var proxy = Cryptpad.getProxy(); - var updateIndentSettings = function () { + var updateIndentSettings = APP.updateIndentSettings = function () { var indentUnit = proxy[indentKey]; var useTabs = proxy[useTabsKey]; setIndentation( @@ -208,6 +208,9 @@ define([ $previewContainer.hide(); APP.$previewButton.removeClass('active'); $codeMirror.addClass('fullPage'); + if (typeof(APP.updateIndentSettings) === 'function') { + APP.updateIndentSettings(); + } }; config.onInit = function (info) {