This commit is contained in:
jazzpi 2015-03-22 15:19:41 +01:00
parent 477b2a6b6b
commit 161c55c94f

View file

@ -25,16 +25,16 @@ class Command
throw new CommandError("Couldn't get access to vim-mode.") throw new CommandError("Couldn't get access to vim-mode.")
mark = @vimState.marks[str[1]] mark = @vimState.marks[str[1]]
unless mark? unless mark?
throw new CommandError('Mark ' + str + ' not set.') throw new CommandError("Mark #{str} not set.")
addr = mark.bufferMarker.range.end.row addr = mark.bufferMarker.range.end.row
else if str[0] is "/" else if str[0] is "/"
addr = Find.findNextInBuffer(@editor.buffer, curPos, str[1...-1]) addr = Find.findNextInBuffer(@editor.buffer, curPos, str[1...-1])
unless addr? unless addr?
throw new CommandError('Pattern not found: ' + str[1...-1]) throw new CommandError("Pattern not found: #{str[1...-1]}")
else if str[0] is "?" else if str[0] is "?"
addr = Find.findPreviousInBuffer(@editor.buffer, curPos, str[1...-1]) addr = Find.findPreviousInBuffer(@editor.buffer, curPos, str[1...-1])
unless addr? unless addr?
throw new CommandError('Pattern not found: ' + str[1...-1]) throw new CommandError("Pattern not found: #{str[1...-1]}")
return addr return addr