mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -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:
parent
a20bcad15c
commit
084abaec06
@ -11941,7 +11941,8 @@ getpos_both(argvars, rettv, getcurpos)
|
|||||||
#endif
|
#endif
|
||||||
(varnumber_T)0);
|
(varnumber_T)0);
|
||||||
if (getcurpos)
|
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
|
else
|
||||||
rettv->vval.v_number = FALSE;
|
rettv->vval.v_number = FALSE;
|
||||||
|
@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
578,
|
||||||
/**/
|
/**/
|
||||||
577,
|
577,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user