diff options
author | watiko <service@mail.watiko.net> | 2016-01-14 21:37:25 +0900 |
---|---|---|
committer | watiko <service@mail.watiko.net> | 2016-02-01 03:43:37 +0900 |
commit | 61a3b14726fe54ac6a8949cad79a91ce9b6739a9 (patch) | |
tree | 2cf7db5a7d075113feb95173c01886b9e2b7f07b /src | |
parent | 9664f513f476b896f81451e1427fc47a60ecea96 (diff) | |
download | rneovim-61a3b14726fe54ac6a8949cad79a91ce9b6739a9.tar.gz rneovim-61a3b14726fe54ac6a8949cad79a91ce9b6739a9.tar.bz2 rneovim-61a3b14726fe54ac6a8949cad79a91ce9b6739a9.zip |
vim-patch:7.4.823
Problem: Cursor moves after CTRL-A on alphabetic character.
Solution: (Hirohito Higashi, test by Christian Brabandt)
https://github.com/vim/vim/commit/25c2f6783a9d5f15e062bd5b085abe7deb121152
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ops.c | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_increment.in | 24 | ||||
-rw-r--r-- | src/nvim/testdir/test_increment.ok | 9 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
4 files changed, 34 insertions, 2 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index d22dcad020..e88d1d611c 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -4416,6 +4416,7 @@ int do_addsub(int command, linenr_T Prenum1, bool g_cmd) did_change = true; (void)del_char(false); ins_char(firstdigit); + curwin->w_cursor.col = col; } else { if (col > 0 && ptr[col - 1] == '-' && !visual) { // negative number diff --git a/src/nvim/testdir/test_increment.in b/src/nvim/testdir/test_increment.in index fb7e6e3ee2..ecbc6f99a1 100644 --- a/src/nvim/testdir/test_increment.in +++ b/src/nvim/testdir/test_increment.in @@ -268,7 +268,15 @@ Text: Expected: 1) <Ctrl-V>j$ <ctrl-a> 2 - 1b + 2a + +20) increment a single letter +Text: + a + + Expected: + 1) <Ctrl-a> and cursor is on a + b @@ -386,6 +394,13 @@ V3kg.. k$ :set nrformats&vim +:" Test 20 +:set nrformats+=alpha +:/^S20=/+,/^E20=/-y a +:/^E20=/+put a +:.put =col('.') +:set nrformats&vim + :" Save the report :/^# Test 1/,$w! test.out :qa! @@ -572,6 +587,13 @@ E19==== +# Test 20 +S20==== +a +E20==== + + + ENDTEST diff --git a/src/nvim/testdir/test_increment.ok b/src/nvim/testdir/test_increment.ok index 685478e668..48e722f038 100644 --- a/src/nvim/testdir/test_increment.ok +++ b/src/nvim/testdir/test_increment.ok @@ -271,6 +271,15 @@ E19==== 2a +# Test 20 +S20==== +a +E20==== + +b +1 + + ENDTEST diff --git a/src/nvim/version.c b/src/nvim/version.c index e41d1ff7ce..937d1e0cbb 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -311,7 +311,7 @@ static int included_patches[] = { 826, // 825, // 824 NA - // 823, + 823, // 822, // 821, // 820, |