forked from aniani/vim
patch 8.2.2670: Vim9: error for append(0, text)
Problem: Vim9: error for append(0, text). Solution: Check for negative number. (closes #8022)
This commit is contained in:
@@ -1621,7 +1621,7 @@ tv_get_lnum(typval_T *argvars)
|
||||
|
||||
if (argvars[0].v_type != VAR_STRING || !in_vim9script())
|
||||
lnum = (linenr_T)tv_get_number_chk(&argvars[0], NULL);
|
||||
if (lnum <= 0) // no valid number, try using arg like line()
|
||||
if (lnum < 0) // no valid number, try using arg like line()
|
||||
{
|
||||
int fnum;
|
||||
pos_T *fp = var2fpos(&argvars[0], TRUE, &fnum, FALSE);
|
||||
|
Reference in New Issue
Block a user