mirror of
https://github.com/atom/atom.git
synced 2026-02-16 01:25:13 -05:00
Assign tooltips in Atom environment constructor
This commit is contained in:
@@ -54,6 +54,8 @@ class TooltipManager
|
||||
placement: 'auto top'
|
||||
viewportPadding: 2
|
||||
|
||||
constructor: ({@keymapManager}) ->
|
||||
|
||||
# Essential: Add a tooltip to the given element.
|
||||
#
|
||||
# * `target` An `HTMLElement`
|
||||
@@ -81,7 +83,7 @@ class TooltipManager
|
||||
{keyBindingCommand, keyBindingTarget} = options
|
||||
|
||||
if keyBindingCommand?
|
||||
bindings = atom.keymaps.findKeyBindings(command: keyBindingCommand, target: keyBindingTarget)
|
||||
bindings = @keymapManager.findKeyBindings(command: keyBindingCommand, target: keyBindingTarget)
|
||||
keystroke = getKeystroke(bindings)
|
||||
if options.title? and keystroke?
|
||||
options.title += " " + getKeystroke(bindings)
|
||||
|
||||
Reference in New Issue
Block a user