Hi Tony and All,

2016-1-12(Tue) 15:13:12 UTC+9 h_east:
> Hi Tony,
> 
> 2016-1-12(Tue) 12:53:15 UTC+9 Tony Mechelynck:
> > On Tue, Jan 12, 2016 at 4:19 AM, Gary Johnson <garyj...@spocom.com> wrote:
> > > On 2016-01-11, KF Leong wrote:
> > >> On Tuesday, 12 January 2016 11:00:17 UTC+8, Tony Mechelynck  wrote:
> > >> > I have the following problem in gvim (Huge) 7.4.1087. My previous
> > >> > build was 7.4.1074 and IIRC it did not have this problem. Between them
> > >> > I notice several patches affecting Ctrl-A and Ctrl-X in Visual mode,
> > >> > or in RTL mode, or with '[ and '] marks, none of which seem to apply
> > >> > to my usecase. I am using Ctrl-A in plain Normal mode and repeating it
> > >> > with . (in the {rhs} of a mapping). Trying to find out what went
> > >> > wrong, I found that apparently _neither_ . _nor_ mappings (nor "q"
> > >> > macros) properly repeat Ctrl-A nowadays:
> > >> >
> > >> > ....
> > >>
> > >> Follow this thread:
> > >> https://groups.google.com/d/msg/vim_dev/rrTPmy_0OGA/BvbIq-cnAwAJ
> > >
> > > That would be the "[patch] visual <C-A>/<C-X> is refactored to
> > > support vcol." thread.  In case one is reading this in a text MUA
> > > and doesn't have a Java-enabled browser handy.
> > >
> > > I didn't see explicit mention of the bug that Tony reported, though.
> > >
> > > Regards,
> > > Gary
> > >
> > Explicit mention, neither could I. Implicit mention, maybe, but over my 
> > head.
> 
> Oh... I can reproduce it.
> 
> How to reproduce:
> - Start pure Vim
>   $ vim -Nu NONE
> - Append three lines "10"
>   3O10<Esc>
> - Add five to 10 at third line in normal mode
>   5<C-A>
> - Redo add
>   .
> 
> Expected result:
> 10
> 10
> 20
> 
> Actual result (in Vim 7.4.1087):
> 10
> 10
> 10
> 10
> 10
> 15
> 
> 
> It seems "5<C-A>" does not set to the redo-buffer.
> I investigate from now.
> Thanks.

Please check the attached patch.
This patch would be fixed the above problem.

--
Best regards,
Hirohito Higashi (a.k.a h_east)

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/normal.c b/src/normal.c
index 810aabf..ac1a391 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -4227,6 +4227,7 @@ nv_addsub(cap)
 {
     if (!VIsual_active && cap->oap->op_type == OP_NOP)
     {
+	prep_redo_cmd(cap);
 	cap->oap->op_type = cap->cmdchar == Ctrl_A ?  OP_NR_ADD : OP_NR_SUB;
 	op_addsub(cap->oap, cap->count1, cap->arg);
 	cap->oap->op_type = OP_NOP;
diff --git a/src/testdir/test_increment.vim b/src/testdir/test_increment.vim
index e4f67ea..9b592ed 100644
--- a/src/testdir/test_increment.vim
+++ b/src/testdir/test_increment.vim
@@ -701,4 +701,11 @@ func Test_visual_increment_37()
   call assert_equal(["1 26", "4 59"], getline(1, 2))
 endfunc
 
+" Check redo after the normal mode increment
+func Test_visual_increment_38()
+  exec "norm! i10\<ESC>5\<C-A>."
+  call assert_equal(["20"], getline(1, '$'))
+  call assert_equal([0, 1, 2, 0], getpos('.'))
+endfunc
+
 " vim: tabstop=2 shiftwidth=2 expandtab

Raspunde prin e-mail lui