mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
Only add keybindings when command is present
This commit is contained in:
parent
4aa612e70c
commit
6948183270
@ -39,10 +39,10 @@ jQuery.fn.setTooltip = (tooltipOptions, {command, commandElement}={}) ->
|
||||
|
||||
tooltipOptions = {title: tooltipOptions} if _.isString(tooltipOptions)
|
||||
|
||||
bindings = if commandElement
|
||||
atom.keymap.keyBindingsForCommandMatchingElement(command, commandElement)
|
||||
else
|
||||
atom.keymap.keyBindingsForCommand(command)
|
||||
if commandElement
|
||||
bindings = atom.keymap.keyBindingsForCommandMatchingElement(command, commandElement)
|
||||
else if command
|
||||
bindings = atom.keymap.keyBindingsForCommand(command)
|
||||
|
||||
tooltipOptions.title = "#{tooltipOptions.title} #{getKeystroke(bindings)}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user