From 92836f49fc2e11b13a79b5c044334c8e791e9c52 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 11 May 2015 10:06:59 +0100 Subject: [PATCH] avoid unnecessary spell checks on session change --- .../directives/aceEditor/spell-check/SpellCheckManager.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor/spell-check/SpellCheckManager.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor/spell-check/SpellCheckManager.coffee index 868f33ca10..a210af929f 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor/spell-check/SpellCheckManager.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor/spell-check/SpellCheckManager.coffee @@ -22,7 +22,8 @@ define [ @closeContextMenu() @editor.on "changeSession", (e) => - @runSpellCheckSoon(200) + if @$scope.spellCheckEnabled and @$scope.spellCheckLanguage and @$scope.spellCheckLanguage != "" + @runSpellCheckSoon(200) e.oldSession?.getDocument().off "change", onChange e.session.getDocument().on "change", onChange