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:
Nathan Sobo
2012-03-23 11:40:59 -06:00
parent 3bda7c4d3f
commit 7708cf7f33
4 changed files with 19 additions and 6 deletions

View File

@@ -11,6 +11,6 @@ class CommandInterpreter
@lastRelativeAddress = command if command.isRelativeAddress()
command.execute(editor)
repeatLastRelativeAddress: (editor) ->
repeatRelativeAddress: (editor) ->
@lastRelativeAddress.execute(editor)

View File

@@ -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())