mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 18:41:48 +00:00
feat(api): tab-local option scope #39811
Problem:
2d795face6 added support for tab-local options ('cmdheight')
to `nvim_get_option_value`, but not to:
nvim_get_option_info2()
nvim_set_option_value(…, { tab = … })
gettabwinvar()
Solution:
- Update `options.lua` to model tab-local options. Introduce `kOptScopeTab`.
- Handle tab scope in the options layer so it works for all options APIs.
Note:
- No change to `gettabvar()`. Not sure if needed/wanted.
fix https://github.com/neovim/neovim/issues/31140
This commit is contained in:
@@ -88,7 +88,7 @@ end
|
||||
local options = {
|
||||
cstr = cstr,
|
||||
--- @type string[]
|
||||
valid_scopes = { 'global', 'buf', 'win' },
|
||||
valid_scopes = { 'global', 'buf', 'win', 'tab' },
|
||||
--- @type vim.option_meta[]
|
||||
--- The order of the options MUST be alphabetic for ":set all".
|
||||
options = {
|
||||
@@ -1350,7 +1350,7 @@ local options = {
|
||||
]=],
|
||||
full_name = 'cmdheight',
|
||||
redraw = { 'all_windows' },
|
||||
scope = { 'global' },
|
||||
scope = { 'global', 'tab' },
|
||||
short_desc = N_('number of lines to use for the command-line'),
|
||||
type = 'number',
|
||||
varname = 'p_ch',
|
||||
|
||||
Reference in New Issue
Block a user