avoid unnecessary spell checks on session change

This commit is contained in:
Brian Gough 2015-05-11 10:06:59 +01:00
parent 8fc41e9e05
commit 92836f49fc

View file

@ -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