mirror of
https://github.com/atom/atom.git
synced 2026-02-17 18:11:29 -05:00
Add repeat-relative-address-in-reverse event to command panel
This commit is contained in:
@@ -47,7 +47,7 @@ describe "CommandPanel", ->
|
||||
expect(commandPanel.miniEditor.getCursorScreenPosition()).toEqual [0, 0]
|
||||
|
||||
describe "when command-panel:repeat-relative-address is triggered on the root view", ->
|
||||
it "calls .repeatRelativeAddress on the command interpreter with the active editor", ->
|
||||
it "repeats the last search command if there is one", ->
|
||||
rootView.trigger 'command-panel:repeat-relative-address'
|
||||
|
||||
editor.setCursorScreenPosition([4, 0])
|
||||
@@ -69,6 +69,18 @@ describe "CommandPanel", ->
|
||||
rootView.trigger 'command-panel:repeat-relative-address'
|
||||
expect(editor.getSelection().getBufferRange()).toEqual [[3,31], [3,38]]
|
||||
|
||||
describe "when command-pane:repeat-relative-address-in-reverse is triggered on the root view", ->
|
||||
it "it repeats the last relative address in the reverse direction", ->
|
||||
rootView.trigger 'command-panel:repeat-relative-address-in-reverse'
|
||||
|
||||
editor.setCursorScreenPosition([6, 0])
|
||||
|
||||
commandPanel.execute("/current")
|
||||
expect(editor.getSelection().getBufferRange()).toEqual [[6,6], [6,13]]
|
||||
|
||||
rootView.trigger 'command-panel:repeat-relative-address-in-reverse'
|
||||
expect(editor.getSelection().getBufferRange()).toEqual [[5,6], [5,13]]
|
||||
|
||||
describe "when command-panel:set-selection-as-regex-address is triggered on the root view", ->
|
||||
it "sets the @lastRelativeAddress to a RegexAddress of the current selection", ->
|
||||
rootView.open(require.resolve('fixtures/sample.js'))
|
||||
|
||||
Reference in New Issue
Block a user