diff options
-rw-r--r-- | src/evalfunc.c | 5 | ||||
-rw-r--r-- | src/testdir/test_changelist.vim | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index daef9a8c9..57929d6d7 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -4365,7 +4365,10 @@ f_getchangelist(typval_T *argvars, typval_T *rettv) return; #ifdef FEAT_JUMPLIST - buf = find_buffer(&argvars[0]); + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + ++emsg_off; + buf = get_buf_tv(&argvars[0], FALSE); + --emsg_off; if (buf == NULL) return; diff --git a/src/testdir/test_changelist.vim b/src/testdir/test_changelist.vim index 0880fce84..dd6ea9600 100644 --- a/src/testdir/test_changelist.vim +++ b/src/testdir/test_changelist.vim @@ -9,7 +9,7 @@ func Test_getchangelist() bwipe! enew call assert_equal([], getchangelist(10)) - call assert_equal([[], 0], getchangelist(bufnr('%'))) + call assert_equal([[], 0], getchangelist('%')) call writefile(['line1', 'line2', 'line3'], 'Xfile1.txt') call writefile(['line1', 'line2', 'line3'], 'Xfile2.txt') @@ -23,7 +23,7 @@ func Test_getchangelist() \ {'lnum' : 2, 'col' : 4, 'coladd' : 0}, \ {'lnum' : 4, 'col' : 4, 'coladd' : 0}, \ {'lnum' : 6, 'col' : 4, 'coladd' : 0}], 2], - \ getchangelist(bufnr('%'))) + \ getchangelist('%')) hide edit Xfile2.txt exe "normal 1GOline\<C-G>u1.0" @@ -31,7 +31,7 @@ func Test_getchangelist() call assert_equal([[ \ {'lnum' : 1, 'col' : 6, 'coladd' : 0}, \ {'lnum' : 3, 'col' : 6, 'coladd' : 0}], 2], - \ getchangelist(bufnr('%'))) + \ getchangelist('%')) hide enew call assert_equal([[ diff --git a/src/version.c b/src/version.c index 92fd162fa..24eef2e8a 100644 --- a/src/version.c +++ b/src/version.c @@ -772,6 +772,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1519, +/**/ 1518, /**/ 1517, |