mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Update spell-check package for new telepath-based marker API
This commit is contained in:
@@ -14,13 +14,13 @@ class MisspellingView extends View
|
||||
@endPosition = range.end
|
||||
@misspellingValid = true
|
||||
|
||||
@marker = @editSession.markScreenRange(range, invalidationStrategy: 'between')
|
||||
@marker.on 'changed', ({newHeadScreenPosition, newTailScreenPosition, valid}) =>
|
||||
@marker = @editSession.markScreenRange(range, invalidation: 'inside')
|
||||
@marker.on 'changed', ({newHeadScreenPosition, newTailScreenPosition, isValid}) =>
|
||||
@startPosition = newTailScreenPosition
|
||||
@endPosition = newHeadScreenPosition
|
||||
@updateDisplayPosition = valid
|
||||
@misspellingValid = valid
|
||||
@hide() unless valid
|
||||
@updateDisplayPosition = isValid
|
||||
@misspellingValid = isValid
|
||||
@hide() unless isValid
|
||||
|
||||
@subscribe @editor, 'editor:display-updated', =>
|
||||
@updatePosition() if @updateDisplayPosition
|
||||
|
||||
Reference in New Issue
Block a user