mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 06:18:16 +00:00
vim-patch:7.4.578
Problem: Using getcurpos() after "$" in an empty line returns a negative number. Solution: Don't add one when this would overflow. (Hirohito Higashi) https://code.google.com/p/vim/source/detail?r=v7-4-578
This commit is contained in:
@@ -9479,7 +9479,9 @@ static void getpos_both(typval_T *argvars, typval_T *rettv, bool getcurpos)
|
||||
list_append_number(l,
|
||||
(fp != NULL) ? (varnumber_T)fp->coladd : (varnumber_T)0);
|
||||
if (getcurpos) {
|
||||
list_append_number(l, (varnumber_T) curwin->w_curswant + 1);
|
||||
list_append_number(l, curwin->w_curswant == MAXCOL
|
||||
? (varnumber_T)MAXCOL
|
||||
: (varnumber_T)curwin->w_curswant + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -206,7 +206,7 @@ static int included_patches[] = {
|
||||
//581,
|
||||
//580,
|
||||
//579,
|
||||
//578,
|
||||
578,
|
||||
//577,
|
||||
//576,
|
||||
//575,
|
||||
|
Reference in New Issue
Block a user