diff options
-rw-r--r-- | src/evalfunc.c | 2 | ||||
-rw-r--r-- | src/testdir/test_vim9_builtin.vim | 10 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index ed9f06fed..098d906ec 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -1753,7 +1753,7 @@ static funcentry_T global_functions[] = {"winrestview", 1, 1, FEARG_1, NULL, ret_void, f_winrestview}, {"winsaveview", 0, 0, 0, NULL, - ret_dict_any, f_winsaveview}, + ret_dict_number, f_winsaveview}, {"winwidth", 1, 1, FEARG_1, NULL, ret_number, f_winwidth}, {"wordcount", 0, 0, 0, NULL, diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index 4eb2d76df..7aef315dc 100644 --- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -786,6 +786,16 @@ def Test_winrestcmd() close enddef +def Test_winsaveview() + var view: dict<number> = winsaveview() + + var lines =<< trim END + var view: list<number> = winsaveview() + END + CheckDefAndScriptFailure(lines, 'E1012: Type mismatch; expected list<number> but got dict<number>', 1) +enddef + + " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker diff --git a/src/version.c b/src/version.c index f4a1d58c8..0d9816bc9 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 */ /**/ + 2310, +/**/ 2309, /**/ 2308, |