1
0
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:
rmaddy 2003-05-07 20:16:34 +00:00
parent 6d4c286ba8
commit 379012c9b4
4 changed files with 9 additions and 4 deletions

View File

@ -295,6 +295,7 @@ public class CommandParser
}
else if (ch == '+' || ch == '-')
{
location.append('0');
state = STATE_RANGE_OFFSET;
}
else if (ch == '\\')

View File

@ -59,7 +59,7 @@ public class Ranges
*/
public int size()
{
return count;
return ranges.size();
}
/**

View File

@ -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;
}

View File

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