mirror of
https://github.com/atom/atom.git
synced 2026-02-09 22:24:59 -05:00
Meta-g repeats the last relative address command
Rename repeatLastRelativeAddress to repeatRelativeAddress since it's implied that it's the "last" one.
This commit is contained in:
@@ -11,6 +11,6 @@ class CommandInterpreter
|
||||
@lastRelativeAddress = command if command.isRelativeAddress()
|
||||
command.execute(editor)
|
||||
|
||||
repeatLastRelativeAddress: (editor) ->
|
||||
repeatRelativeAddress: (editor) ->
|
||||
@lastRelativeAddress.execute(editor)
|
||||
|
||||
|
||||
@@ -17,8 +17,12 @@ class CommandPanel extends View
|
||||
escape: 'command-panel:toggle'
|
||||
enter: 'command-panel:execute'
|
||||
|
||||
window.keymap.bindKeys '.editor',
|
||||
'meta-g': 'command-panel:repeat-relative-address'
|
||||
|
||||
@rootView.on 'command-panel:toggle', => @toggle()
|
||||
@rootView.on 'command-panel:execute', => @execute()
|
||||
@rootView.on 'command-panel:repeat-relative-address', => @repeatRelativeAddress()
|
||||
@editor.addClass 'single-line'
|
||||
|
||||
@commandInterpreter = new CommandInterpreter()
|
||||
@@ -35,4 +39,7 @@ class CommandPanel extends View
|
||||
|
||||
execute: ->
|
||||
@commandInterpreter.eval(@rootView.activeEditor(), @editor.getText())
|
||||
@toggle()
|
||||
@toggle()
|
||||
|
||||
repeatRelativeAddress: ->
|
||||
@commandInterpreter.repeatRelativeAddress(@rootView.activeEditor())
|
||||
|
||||
Reference in New Issue
Block a user