mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Don't throw exception if hitting meta-g with no previous relative address
This commit is contained in:
@@ -105,7 +105,9 @@ describe "CommandInterpreter", ->
|
||||
expect(buffer.lineForRow(6)).toBe ' current < pivot ? left.push(current) : right.push(current);'
|
||||
|
||||
describe ".repeatRelativeAddress()", ->
|
||||
it "repeats the last search command", ->
|
||||
it "repeats the last search command if there is one", ->
|
||||
interpreter.repeatRelativeAddress(editor) # don't raise an exception
|
||||
|
||||
editor.setCursorScreenPosition([4, 0])
|
||||
|
||||
interpreter.eval(editor, '/current')
|
||||
|
||||
@@ -12,5 +12,5 @@ class CommandInterpreter
|
||||
command.execute(editor)
|
||||
|
||||
repeatRelativeAddress: (editor) ->
|
||||
@lastRelativeAddress.execute(editor)
|
||||
@lastRelativeAddress?.execute(editor)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user