mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-04-21 07:15:46 +02:00
Fixed bug which prevented :0, :1, or :<neg> from working
This commit is contained in:
parent
6d4c286ba8
commit
379012c9b4
src/com/maddyhome/idea/vim/ex
@ -295,6 +295,7 @@ public class CommandParser
|
||||
}
|
||||
else if (ch == '+' || ch == '-')
|
||||
{
|
||||
location.append('0');
|
||||
state = STATE_RANGE_OFFSET;
|
||||
}
|
||||
else if (ch == '\\')
|
||||
|
@ -59,7 +59,7 @@ public class Ranges
|
||||
*/
|
||||
public int size()
|
||||
{
|
||||
return count;
|
||||
return ranges.size();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,13 +52,17 @@ public class GotoLineHandler extends CommandHandler
|
||||
{
|
||||
int count = cmd.getLine(editor, context);
|
||||
|
||||
if (count > 0)
|
||||
if (count >= 0)
|
||||
{
|
||||
MotionGroup.moveCaret(editor, context,
|
||||
CommandGroups.getInstance().getMotion().moveCaretToLineStartSkipLeading(editor, count));
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
MotionGroup.moveCaret(editor, context, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -28,8 +28,8 @@ import com.maddyhome.idea.vim.helper.EditorHelper;
|
||||
*/
|
||||
public class LineNumberRange extends AbstractRange
|
||||
{
|
||||
public static final int CURRENT_LINE = -3;
|
||||
public static final int LAST_LINE = -4;
|
||||
public static final int CURRENT_LINE = -99999999;
|
||||
public static final int LAST_LINE = -99999998;
|
||||
|
||||
/**
|
||||
* Create a range for the current line
|
||||
|
Loading…
Reference in New Issue
Block a user