From 4dc4cf346755375e49410e16635c00a602b26c36 Mon Sep 17 00:00:00 2001 From: ii14 <59243201+ii14@users.noreply.github.com> Date: Wed, 7 Sep 2022 17:59:27 +0200 Subject: fix(options): mark `winhighlight` as list style (#19477) Also add missing fcs, lcs and winhighlight to list of key-value options for `vim.opt`. Co-authored-by: ii14 --- runtime/lua/vim/_meta.lua | 3 +++ src/nvim/options.lua | 3 ++- test/functional/api/vim_spec.lua | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua index f1652718ee..0f45c916dc 100644 --- a/runtime/lua/vim/_meta.lua +++ b/runtime/lua/vim/_meta.lua @@ -198,7 +198,10 @@ end -- Can be done in a separate PR. local key_value_options = { fillchars = true, + fcs = true, listchars = true, + lcs = true, + winhighlight = true, winhl = true, } diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 49adf03aa0..1d9a821e20 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -2868,7 +2868,8 @@ return { { full_name='winhighlight', abbreviation='winhl', short_desc=N_("Setup window-local highlights"); - type='string', scope={'window'}, + type='string', list='onecomma', scope={'window'}, + deny_duplicates=true, alloced=true, redraw={'current_window'}, defaults={if_true=""} diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index edbdd54c2f..44775ef85c 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -2732,8 +2732,8 @@ describe('API', function() it('should have information about window options', function() eq({ - allows_duplicates = true, - commalist = false; + allows_duplicates = false, + commalist = true; default = ""; flaglist = false; global_local = false; -- cgit