@@ -16,7 +16,7 @@ class SpellCheckView
1616 @ initializeMarkerLayer ()
1717
1818 @correctMisspellingCommand = atom .commands .add atom .views .getView (@editor ), ' spell-check:correct-misspelling' , =>
19- if marker = @markerLayer .findMarkers ({containsPoint : @editor .getCursorBufferPosition ()})[0 ]
19+ if marker = @markerLayer .findMarkers ({containsBufferPosition : @editor .getCursorBufferPosition ()})[0 ]
2020 CorrectionsView ?= require ' ./corrections-view'
2121 @correctionsView ? .destroy ()
2222 @correctionsView = new CorrectionsView (@editor , @ getCorrections (marker), marker)
@@ -42,7 +42,7 @@ class SpellCheckView
4242 @disposables .add @editor .onDidDestroy (@destroy .bind (this ))
4343
4444 initializeMarkerLayer : ->
45- @markerLayer = @editor .getBuffer (). addMarkerLayer ()
45+ @markerLayer = @editor .addMarkerLayer ({ maintainHistory : false } )
4646 @markerLayerDecoration = @editor .decorateMarkerLayer (@markerLayer , {
4747 type : ' highlight' ,
4848 class : ' spell-check-misspelling' ,
@@ -84,12 +84,7 @@ class SpellCheckView
8484
8585 addMarkers : (misspellings ) ->
8686 for misspelling in misspellings
87- @markerLayer .markRange (misspelling,
88- invalidate : ' touch' ,
89- replicate : ' false' ,
90- persistent : false ,
91- maintainHistory : false ,
92- )
87+ @markerLayer .markBufferRange (misspelling, {invalidate : ' touch' })
9388
9489 updateMisspellings : ->
9590 # Task::start can throw errors atom/atom#3326
@@ -100,5 +95,5 @@ class SpellCheckView
10095
10196 getCorrections : (marker ) ->
10297 SpellChecker ?= require ' spellchecker'
103- misspelling = @editor .getTextInBufferRange (marker .getRange ())
98+ misspelling = @editor .getTextInBufferRange (marker .getBufferRange ())
10499 corrections = SpellChecker .getCorrectionsForMisspelling (misspelling)
0 commit comments