diff --git a/src/option.c b/src/option.c index 93e3c391fd..2d5f3b83a9 100644 --- a/src/option.c +++ b/src/option.c @@ -12363,8 +12363,10 @@ get_winbuf_options(int bufopt) { if (opt->flags & P_STRING) dict_add_nr_str(d, opt->fullname, 0L, *(char_u **)varp); + else if (opt->flags & P_NUM) + dict_add_nr_str(d, opt->fullname, *(long *)varp, NULL); else - dict_add_nr_str(d, opt->fullname, *varp, NULL); + dict_add_nr_str(d, opt->fullname, *(int *)varp, NULL); } } } diff --git a/src/testdir/test_bufwintabinfo.vim b/src/testdir/test_bufwintabinfo.vim index 5c916e2dd7..1c9350c416 100644 --- a/src/testdir/test_bufwintabinfo.vim +++ b/src/testdir/test_bufwintabinfo.vim @@ -87,9 +87,17 @@ function Test_get_buf_options() endfunc function Test_get_win_options() + if has('folding') + set foldlevel=999 + endif + set list let opts = getwinvar(1, '&') call assert_equal(v:t_dict, type(opts)) call assert_equal(0, opts.linebreak) + call assert_equal(1, opts.list) + if has('folding') + call assert_equal(999, opts.foldlevel) + endif if has('signs') call assert_equal('auto', opts.signcolumn) endif @@ -97,7 +105,12 @@ function Test_get_win_options() let opts = gettabwinvar(1, 1, '&') call assert_equal(v:t_dict, type(opts)) call assert_equal(0, opts.linebreak) + call assert_equal(1, opts.list) if has('signs') call assert_equal('auto', opts.signcolumn) endif + set list& + if has('folding') + set foldlevel=0 + endif endfunc diff --git a/src/version.c b/src/version.c index 1b932fae43..dcf02c288c 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 3, /**/ 2, /**/