Skip to content

Commit

Permalink
Use proper method to subscribe to onDidTokenize
Browse files Browse the repository at this point in the history
Way back in
atom/atom@117a3fb
(released in Atom v1.9.0-beta0) Atom introduced an experimental
TextEditor::onDidTokenize method in order to subscribe to that event.
Switch to using this instead of grabbing it through the private
properties which no longer work as of Atom v1.25.0-beta0.

Fixes #649.
  • Loading branch information
Arcanemagus committed Feb 13, 2018
1 parent 6152811 commit f8ba51d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/minimap.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,7 @@ class Minimap {
resulting in extra lines appearing at the end of the minimap.
Forcing a whole repaint to fix that bug is suboptimal but works.
*/
const tokenizedBuffer = this.textEditor.tokenizedBuffer
? this.textEditor.tokenizedBuffer
: this.textEditor.displayBuffer.tokenizedBuffer

subs.add(tokenizedBuffer.onDidTokenize(() => {
subs.add(this.textEditor.onDidTokenize(() => {
this.emitter.emit('did-change-config')
}))
}
Expand Down

0 comments on commit f8ba51d

Please sign in to comment.