mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-05-06 03:34:03 +02:00
Added count so Ex command can be repeated.
This commit is contained in:
parent
aad2a65678
commit
f85148b766
@ -72,7 +72,8 @@ public abstract class CommandHandler
|
||||
return flags;
|
||||
}
|
||||
|
||||
public void process(final Editor editor, final DataContext context, final ExCommand cmd) throws ExException
|
||||
public void process(final Editor editor, final DataContext context, final ExCommand cmd, final int count) throws
|
||||
ExException
|
||||
{
|
||||
if ((flags & RANGE_FORBIDDEN) != 0 && cmd.getRanges().size() != 0)
|
||||
{
|
||||
@ -89,16 +90,20 @@ public abstract class CommandHandler
|
||||
RunnableHelper.runWriteCommand(new Runnable() {
|
||||
public void run()
|
||||
{
|
||||
boolean res = false;
|
||||
boolean res = true;
|
||||
try
|
||||
{
|
||||
UndoManager.getInstance().beginCommand(editor);
|
||||
res = execute(editor, context, cmd);
|
||||
for (int i = 0; i < count && res; i++)
|
||||
{
|
||||
res = execute(editor, context, cmd);
|
||||
}
|
||||
}
|
||||
catch (ExException e)
|
||||
{
|
||||
// TODO - handle this
|
||||
VimPlugin.indicateError();
|
||||
res = false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
@ -121,7 +126,10 @@ public abstract class CommandHandler
|
||||
{
|
||||
try
|
||||
{
|
||||
execute(editor, context, cmd);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
execute(editor, context, cmd);
|
||||
}
|
||||
}
|
||||
catch (ExException e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user