diff options
-rw-r--r-- | src/testdir/test_vim9_builtin.vim | 4 | ||||
-rw-r--r-- | src/typval.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index 73251c0bac..8f112174e5 100644 --- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -123,6 +123,10 @@ def Test_append() var res2: bool = append(3, 'two') assert_equal(false, res2) assert_equal(['0', 'one', '1', 'two', '2'], getline(1, 6)) + + append(0, 'zero') + assert_equal('zero', getline(1)) + bwipe! enddef def Test_balloon_show() diff --git a/src/typval.c b/src/typval.c index 8030c6953f..ca561ddbf7 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); diff --git a/src/version.c b/src/version.c index 00d2fd74a3..1f389e9ef7 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2670, +/**/ 2669, /**/ 2668, |