mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Clear highlighted word manager on session change
This commit is contained in:
parent
f6743b839f
commit
123300cdfb
2 changed files with 5 additions and 0 deletions
|
@ -12,6 +12,9 @@ define [
|
|||
|
||||
class HighlightedWordManager
|
||||
constructor: (@editor) ->
|
||||
@reset()
|
||||
|
||||
reset: () ->
|
||||
@highlights = rows: []
|
||||
|
||||
addHighlight: (highlight) ->
|
||||
|
|
|
@ -22,6 +22,8 @@ define [
|
|||
@closeContextMenu()
|
||||
|
||||
@editor.on "changeSession", (e) =>
|
||||
@highlightedWordManager.reset()
|
||||
|
||||
if @$scope.spellCheckEnabled and @$scope.spellCheckLanguage and @$scope.spellCheckLanguage != ""
|
||||
@runSpellCheckSoon(200)
|
||||
|
||||
|
|
Loading…
Reference in a new issue