mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
updated for version 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)
This commit is contained in:
@@ -11941,7 +11941,8 @@ getpos_both(argvars, rettv, getcurpos)
|
||||
#endif
|
||||
(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);
|
||||
}
|
||||
else
|
||||
rettv->vval.v_number = FALSE;
|
||||
|
Reference in New Issue
Block a user