|
@@ -36,12 +36,12 @@ define [], () ->
|
|
|
if @isSpellCheckEnabled()
|
|
if @isSpellCheckEnabled()
|
|
|
@markLinesAsUpdated(@adapter.normalizeChangeEvent(e))
|
|
@markLinesAsUpdated(@adapter.normalizeChangeEvent(e))
|
|
|
|
|
|
|
|
- @adapter.wordManager.clearHighlightTouchingRange(e)
|
|
|
|
|
|
|
+ @adapter.highlightedWordManager.clearHighlightTouchingRange(e)
|
|
|
|
|
|
|
|
@runSpellCheckSoon()
|
|
@runSpellCheckSoon()
|
|
|
|
|
|
|
|
onSessionChange: () =>
|
|
onSessionChange: () =>
|
|
|
- @adapter.wordManager.reset()
|
|
|
|
|
|
|
+ @adapter.highlightedWordManager.reset()
|
|
|
@inProgressRequest.abort() if @inProgressRequest?
|
|
@inProgressRequest.abort() if @inProgressRequest?
|
|
|
|
|
|
|
|
@runSpellCheckSoon(200) if @isSpellCheckEnabled()
|
|
@runSpellCheckSoon(200) if @isSpellCheckEnabled()
|
|
@@ -76,12 +76,12 @@ define [], () ->
|
|
|
|
|
|
|
|
learnWord: (highlight) =>
|
|
learnWord: (highlight) =>
|
|
|
@apiRequest "/learn", word: highlight.word
|
|
@apiRequest "/learn", word: highlight.word
|
|
|
- @adapter.wordManager.removeHighlight highlight
|
|
|
|
|
|
|
+ @adapter.highlightedWordManager.removeHighlight highlight
|
|
|
language = @$scope.spellCheckLanguage
|
|
language = @$scope.spellCheckLanguage
|
|
|
@cache?.put("#{language}:#{highlight.word}", true)
|
|
@cache?.put("#{language}:#{highlight.word}", true)
|
|
|
|
|
|
|
|
runFullCheck: () ->
|
|
runFullCheck: () ->
|
|
|
- @adapter.wordManager.reset()
|
|
|
|
|
|
|
+ @adapter.highlightedWordManager.reset()
|
|
|
@runSpellCheck() if @isSpellCheckEnabled()
|
|
@runSpellCheck() if @isSpellCheckEnabled()
|
|
|
|
|
|
|
|
markLinesAsUpdated: (change) ->
|
|
markLinesAsUpdated: (change) ->
|
|
@@ -146,11 +146,11 @@ define [], () ->
|
|
|
displayResult = (highlights) =>
|
|
displayResult = (highlights) =>
|
|
|
if linesToProcess?
|
|
if linesToProcess?
|
|
|
for shouldProcess, row in linesToProcess
|
|
for shouldProcess, row in linesToProcess
|
|
|
- @adapter.wordManager.clearRow(row) if shouldProcess
|
|
|
|
|
|
|
+ @adapter.highlightedWordManager.clearRow(row) if shouldProcess
|
|
|
else
|
|
else
|
|
|
- @adapter.wordManager.reset()
|
|
|
|
|
|
|
+ @adapter.highlightedWordManager.reset()
|
|
|
for highlight in highlights
|
|
for highlight in highlights
|
|
|
- @adapter.wordManager.addHighlight highlight
|
|
|
|
|
|
|
+ @adapter.highlightedWordManager.addHighlight highlight
|
|
|
|
|
|
|
|
if not words.length
|
|
if not words.length
|
|
|
displayResult highlights
|
|
displayResult highlights
|