Skip to content

Commit 67f9dd8

Browse files
committed
fix #2, #3 when opening settings tab
1 parent 3c561a2 commit 67f9dd8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/minimap-view.coffee

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class MinimapView extends View
1515
atom.workspaceView.minimap = this
1616

1717
@subscribe atom.workspaceView, 'pane-container:active-pane-item-changed', =>
18-
console.log('Pane changed')
1918
@update()
2019

2120
@subscribe atom.workspaceView, 'cursor:moved', =>
@@ -38,10 +37,13 @@ class MinimapView extends View
3837
@pane = atom.workspaceView.getActivePane()
3938

4039
getActiveEditor: ->
41-
@editor = atom.workspaceView.getActivePaneItem()
42-
if !@editor
43-
return
4440
@editorView = atom.workspaceView.getActiveView()
41+
# Ignore `Settings Tab` or `Tabs` are empty.
42+
if !@editorView || @editorView.hasClass('settings-view')
43+
@editor = null
44+
@scrollView = null
45+
return
46+
@editor = @editorView.getEditor()
4547
@scrollView = @editorView.find('.scroll-view')
4648

4749
storeActiveBuffer: ->
@@ -62,7 +64,6 @@ class MinimapView extends View
6264
if this.hasClass('hide')
6365
this.removeClass('hide')
6466

65-
6667
top = @editorView.offset().top
6768
this.css('top', top + 'px')
6869

0 commit comments

Comments
 (0)