[vim/vim] v_CTRL-A/X not incrementing some numbers when selection ends in an empty line (#2387)

50 views
Skip to first unread message

Alex

unread,
Nov 29, 2017, 10:34:14 AM11/29/17
to vim/vim, Subscribed

Selecting several numbers followed by an empty line and then using CTRL-A/X can result in only some of them being incremented/decremented. v_g_CTRL-A/X shows similar behaviour.

Input to reproduce:
10i0<CR><Esc>vgg<C-A>

Result:

1
1
1
1
1
1
1
0
0
0

I've reproduced this on MSYS2 on Windows using version 8.0.1305 and in gvim on Windows using version 8.0.586, both with vim -N -u NONE.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

h_east

unread,
Nov 29, 2017, 11:24:46 AM11/29/17
to vim_dev
Hi Alex,

2017-11-30(Thu) 0:34:14 UTC+9 Alex:


> Selecting several numbers followed by an empty line and then using CTRL-A/X can result in only some of them being incremented/decremented. v_g_CTRL-A/X shows similar behaviour.
>
> Input to reproduce:
>
> 10i0<CR><Esc>vgg<C-A>
>
> Result:
> 1
> 1
> 1
> 1
> 1
> 1
> 1
> 0
> 0
> 0
>
>
>
> I've reproduced this on MSYS2 on Windows using version 8.0.1305 and in gvim on Windows using version 8.0.586, both with vim -N -u NONE.

Could you try the attached patch?

You can get the patch from thread of vim_dev ML below.
https://groups.google.com/d/msg/vim_dev/uoA9Q9nARn8/uSaydLK9DgAJ
--
Best regards,
Hirohito Higashi (h_east)

fix_v_ctrl-a_issue.patch

h_east

unread,
Nov 29, 2017, 11:30:19 AM11/29/17
to vim/vim, Subscribed

Hmm? My reply of vim_dev is not reflected in this issue of github.
https://groups.google.com/d/msg/vim_dev/uoA9Q9nARn8/J3vmL-uNAQAJ

Alex

unread,
Nov 30, 2017, 11:24:20 AM11/30/17
to vim/vim, Subscribed

Thanks for the quick patch! I don't currently have a vim build set up, but if it would help, I could set one up and try it out when I have some time, hopefully within the next week or so.

Bram Moolenaar

unread,
Dec 5, 2017, 11:22:48 AM12/5/17
to vim/vim, Subscribed

Closed #2387 via 5fe6bdf.

Reply all
Reply to author
Forward
0 new messages