Permalink
Browse files

Fix #27. Visual mode change/substitute, followed by '.' to repeat.

  • Loading branch information...
1 parent f94e982 commit 2626ccc3d1608930077fb45f0ad5cf4feedf435f @keforbes keforbes committed Jun 8, 2012
@@ -29,7 +29,7 @@ public void execute(EditorAdaptor editorAdaptor, int count)
public CountAwareCommand repetition() {
TextOperation wrappedRepetition = command.repetition();
if (wrappedRepetition != null) {
- return new Repetition();
+ return new Repetition(wrappedRepetition);
}
return null;
}
@@ -43,11 +43,17 @@ public DontChangeMode(TextOperation command) {
/** Repetition of SelectionBasedTextOperation */
public class Repetition extends CountAwareCommand {
+
+ private TextOperation repetition;
+
+ public Repetition(TextOperation repeat) {
+ this.repetition = repeat;
+ }
@Override
public void execute(EditorAdaptor editorAdaptor, int count)
throws CommandExecutionException {
- command.execute(editorAdaptor, count, editorAdaptor.getLastActiveSelection());
+ repetition.execute(editorAdaptor, count, editorAdaptor.getLastActiveSelection());
if (changeMode)
LeaveVisualModeCommand.doIt(editorAdaptor);
}

0 comments on commit 2626ccc

Please sign in to comment.