Clear highlighted word manager on session change

This commit is contained in:
James Allen 2017-02-08 11:08:26 +01:00
parent f6743b839f
commit 123300cdfb
2 changed files with 5 additions and 0 deletions

View file

@ -12,6 +12,9 @@ define [
class HighlightedWordManager
constructor: (@editor) ->
@reset()
reset: () ->
@highlights = rows: []
addHighlight: (highlight) ->

View file

@ -22,6 +22,8 @@ define [
@closeContextMenu()
@editor.on "changeSession", (e) =>
@highlightedWordManager.reset()
if @$scope.spellCheckEnabled and @$scope.spellCheckLanguage and @$scope.spellCheckLanguage != ""
@runSpellCheckSoon(200)