mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	vim-patch:7.4.823
Problem:    Cursor moves after CTRL-A on alphabetic character.
Solution:   (Hirohito Higashi, test by Christian Brabandt)
25c2f6783a
			
			
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -271,6 +271,15 @@ E19==== | ||||
| 2a | ||||
|  | ||||
|  | ||||
| # Test 20 | ||||
| S20==== | ||||
| a | ||||
| E20==== | ||||
|  | ||||
| b | ||||
| 1 | ||||
|  | ||||
|  | ||||
|  | ||||
| ENDTEST | ||||
|  | ||||
|   | ||||
| @@ -311,7 +311,7 @@ static int included_patches[] = { | ||||
|   826, | ||||
|   // 825, | ||||
|   // 824 NA | ||||
|   // 823, | ||||
|   823, | ||||
|   // 822, | ||||
|   // 821, | ||||
|   // 820, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 watiko
					watiko