forked from aniani/vim
patch 9.0.2159: screenpos() may crash with neg. column
Problem: screenpos() may crash with neg. column Solution: validate and correct column closes: #13669 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a40e1687e7
commit
ec54af4e26
@@ -1531,6 +1531,8 @@ f_screenpos(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
return;
|
||||
}
|
||||
pos.col = tv_get_number(&argvars[2]) - 1;
|
||||
if (pos.col < 0)
|
||||
pos.col = 0;
|
||||
pos.coladd = 0;
|
||||
textpos2screenpos(wp, &pos, &row, &scol, &ccol, &ecol);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user