diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-03-28 15:46:16 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-03-28 15:46:16 +0200 |
commit | b2ac7d0663ef31a335c50c6afca042ed9ace5059 (patch) | |
tree | e0fe993690e2988d719b7fff79d7bef0679420e2 /src/typval.c | |
parent | df749a2b9cab579b8c0ca6ca91889aa03d2da704 (diff) | |
download | vim-git-b2ac7d0663ef31a335c50c6afca042ed9ace5059.tar.gz |
patch 8.2.2670: Vim9: error for append(0, text)v8.2.2670
Problem: Vim9: error for append(0, text).
Solution: Check for negative number. (closes #8022)
Diffstat (limited to 'src/typval.c')
-rw-r--r-- | src/typval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/typval.c b/src/typval.c index 8030c6953..ca561ddbf 100644 --- a/src/typval.c +++ b/src/typval.c @@ -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); |