Hi.
After visual block-wise Ctrl-A (Ctrl-X), dot-repeat doesn't work properly.
[repro steps]
vim -u NONE -N
-------------
1 23
4 56
-------------
type: ggf2<C-V>gl<C-A>
-------------
1 24
4 57
-------------
and type: .
(dot-repeat)
expected:
-------------
1 25
4 58
-------------
actual:
-------------
2 24
5 57
-------------
It appears that content of redobuff is incorrect.
expected: <C-V>1j1<space>1<C-A>
actual: <C-V>1j0<space>1<C-A>
Thank you.
- Ozaki Kiichi
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/normal.c b/src/normal.c
--- a/src/normal.c
+++ b/src/normal.c
@@ -3632,7 +3632,7 @@ prep_redo_visual(cap)
else if (curbuf->b_visual.vi_end.col > curbuf->b_visual.vi_start.col)
{
AppendNumberToRedobuff(curbuf->b_visual.vi_end.col
- - curbuf->b_visual.vi_start.col - 1);
+ - curbuf->b_visual.vi_start.col);
AppendCharToRedobuff(' ');
}
}
diff --git a/src/testdir/test_increment.in b/src/testdir/test_increment.in
--- a/src/testdir/test_increment.in
+++ b/src/testdir/test_increment.in
@@ -286,6 +286,16 @@ 0x123456
1) Ctrl-V f3 <ctrl-a>
0x124456
+22) block-wise increment and dot-repeat
+Text:
+ 1 23
+ 4 56
+
+ Expected:
+ 1) f2 Ctrl-V jl <ctrl-a>, repeat twice afterwards with .
+ 1 26
+ 4 59
+
STARTTEST
@@ -415,6 +425,11 @@ V3kg..
:set nrformats&vim
f3
+:" Test 22
+:/^S22=/+,/^E22=/-y a
+:/^E22=/+put a
+kf2jl..
+
:" Save the report
:/^# Test 1/,$w! test.out
:qa!
@@ -615,6 +630,14 @@ E21====
+# Test 22
+S22====
+ 1 23
+ 4 56
+E22====
+
+
+
ENDTEST
diff --git a/src/testdir/test_increment.ok b/src/testdir/test_increment.ok
--- a/src/testdir/test_increment.ok
+++ b/src/testdir/test_increment.ok
@@ -288,6 +288,16 @@ E21====
0x124456
+# Test 22
+S22====
+ 1 23
+ 4 56
+E22====
+
+ 1 26
+ 4 59
+
+
ENDTEST