Skip to content

Commit

Permalink
🐛 Fix broken actions and navigation in quick settings
Browse files Browse the repository at this point in the history
  • Loading branch information
abe33 committed Dec 5, 2014
1 parent 01a9d0a commit b2114b3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/minimap-quick-settings-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ class MinimapQuickSettingsView extends View
@subscriptions.add Minimap.onDidDeactivatePlugin ({name, plugin}) =>
@deactivateItem(name, plugin)

@subscriptions.add atom.commands.add this,
@subscriptions.add atom.commands.add '.minimap-quick-settings',
'core:move-up': => @selectPreviousItem()
'core:move-down': => @selectNextItem()
'core:cancel': => @destroy()
'core:validate': => @toggleSelectedItem()
'core:confirm': => @toggleSelectedItem()

@codeHighlights.toggleClass('active', @minimapView.displayCodeHighlights)
@codeHighlights.on 'mousedown', (e) =>
Expand Down Expand Up @@ -88,7 +88,8 @@ class MinimapQuickSettingsView extends View
item = $("<li class='#{cls}'>#{name}</li>")
item.on 'mousedown', (e) =>
e.preventDefault()
@trigger "minimap:toggle-#{name}"
atom.commands.dispatch item[0], "minimap:toggle-#{name}"

@plugins[name] = item
@separator.before item
unless @selectedItem?
Expand Down

0 comments on commit b2114b3

Please sign in to comment.