Hi Urtica,
2016-3-21(Mon) 6:33:45 UTC+9 Urtica dioica:
> 7.4.1087 caused a regression (still present in 7.4.1627).
>
> hello 1
> world
> --- l<C-A>jx
> hello 2
> wrld
>
> Using j or k after a regular increment/decrement that moves the cursor right
> returns to the old column.
Attached patch would fix this issue.
Please confirm this patch.
Thanks for reporting!
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/ops.c b/src/ops.c
index fa159e9..b1910d9 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -5783,6 +5783,8 @@ do_addsub(
theend:
if (visual)
curwin->w_cursor = save_cursor;
+ else if (did_change)
+ curwin->w_set_curswant = TRUE;
return did_change;
}
diff --git a/src/testdir/test_increment.vim b/src/testdir/test_increment.vim
index 275969e..a6578cf 100644
--- a/src/testdir/test_increment.vim
+++ b/src/testdir/test_increment.vim
@@ -727,4 +727,13 @@ func Test_normal_increment_01()
call assert_equal("002", getline(1))
endfunc
+" Test a regression of patch 7.4.1087 fixed.
+func Test_normal_increment_02()
+ call setline(1, ["hello 10", "world"])
+ exec "norm! ggl\<C-A>jx"
+ call assert_equal(["hello 11", "worl"], getline(1, '$'))
+ call assert_equal([0, 2, 4, 0], getpos('.'))
+endfunc
+
+
" vim: tabstop=2 shiftwidth=2 expandtab