Skip to content

Commit

Permalink
🐛 Fix infinite loop in scroll top listener
Browse files Browse the repository at this point in the history
Fixes #491
  • Loading branch information
abe33 committed Jun 9, 2016
1 parent 5c83144 commit 46b6f1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/minimap.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,11 @@ export default class Minimap {
}))

subs.add(this.adapter.onDidChangeScrollTop(() => {
if (!this.standAlone && !this.ignoreTextEditorScroll) {
if (!this.standAlone && !this.ignoreTextEditorScroll && !this.inChangeScrollTop) {
this.inChangeScrollTop = true
this.updateScrollTop()
this.emitter.emit('did-change-scroll-top', this)
this.inChangeScrollTop = false
}

if (this.ignoreTextEditorScroll) {
Expand Down

0 comments on commit 46b6f1f

Please sign in to comment.