mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Clear highlighted word manager on session change
This commit is contained in:
+3
@@ -12,6 +12,9 @@ define [
|
|||||||
|
|
||||||
class HighlightedWordManager
|
class HighlightedWordManager
|
||||||
constructor: (@editor) ->
|
constructor: (@editor) ->
|
||||||
|
@reset()
|
||||||
|
|
||||||
|
reset: () ->
|
||||||
@highlights = rows: []
|
@highlights = rows: []
|
||||||
|
|
||||||
addHighlight: (highlight) ->
|
addHighlight: (highlight) ->
|
||||||
|
|||||||
+2
@@ -22,6 +22,8 @@ define [
|
|||||||
@closeContextMenu()
|
@closeContextMenu()
|
||||||
|
|
||||||
@editor.on "changeSession", (e) =>
|
@editor.on "changeSession", (e) =>
|
||||||
|
@highlightedWordManager.reset()
|
||||||
|
|
||||||
if @$scope.spellCheckEnabled and @$scope.spellCheckLanguage and @$scope.spellCheckLanguage != ""
|
if @$scope.spellCheckEnabled and @$scope.spellCheckLanguage and @$scope.spellCheckLanguage != ""
|
||||||
@runSpellCheckSoon(200)
|
@runSpellCheckSoon(200)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user