Skip to content

Commit

Permalink
Merge pull request #7027 from lonerover/vim-8.0.0003
Browse files Browse the repository at this point in the history
vim-patch:8.0.0003
  • Loading branch information
jamessan committed Jul 19, 2017
2 parents 26124b4 + b98ea04 commit c40093f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/nvim/option.c
Expand Up @@ -7039,8 +7039,11 @@ dict_T *get_winbuf_options(const int bufopt)
if (opt->flags & P_STRING) {
tv_dict_add_str(d, opt->fullname, strlen(opt->fullname),
*(const char **)varp);
} else if (opt->flags & P_NUM) {
tv_dict_add_nr(d, opt->fullname, strlen(opt->fullname),
*(long *)varp);
} else {
tv_dict_add_nr(d, opt->fullname, strlen(opt->fullname), *varp);
tv_dict_add_nr(d, opt->fullname, strlen(opt->fullname), *(int *)varp);
}
}
}
Expand Down
13 changes: 13 additions & 0 deletions src/nvim/testdir/test_bufwintabinfo.vim
Expand Up @@ -87,17 +87,30 @@ 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

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
2 changes: 1 addition & 1 deletion src/nvim/version.c
Expand Up @@ -726,7 +726,7 @@ static const int included_patches[] = {
6,
// 5 NA
4,
// 3,
3,
2,
1,
0
Expand Down

0 comments on commit c40093f

Please sign in to comment.