mirror of
https://github.com/neovim/neovim.git
synced 2026-02-20 09:19:43 +10:00
feat(api): more fields in nvim_list_uis
Problem: nvim_list_uis does not report all ":help ui-option" fields. Solution: Store ":help ui-option" fields on the `UI` object and update ui_array.
This commit is contained in:
@@ -2549,20 +2549,26 @@ describe('API', function()
|
||||
{
|
||||
chan = 1,
|
||||
ext_cmdline = false,
|
||||
ext_hlstate = false,
|
||||
ext_linegrid = screen._options.ext_linegrid or false,
|
||||
ext_messages = false,
|
||||
ext_multigrid = false,
|
||||
ext_popupmenu = false,
|
||||
ext_tabline = false,
|
||||
ext_wildmenu = false,
|
||||
ext_linegrid = screen._options.ext_linegrid or false,
|
||||
ext_multigrid = false,
|
||||
ext_hlstate = false,
|
||||
ext_termcolors = false,
|
||||
ext_messages = false,
|
||||
ext_wildmenu = false,
|
||||
height = 4,
|
||||
rgb = true,
|
||||
override = true,
|
||||
rgb = true,
|
||||
stdin_tty = false,
|
||||
stdout_tty = false,
|
||||
term_background = '',
|
||||
term_colors = 0,
|
||||
term_name = '',
|
||||
width = 20,
|
||||
}
|
||||
}
|
||||
|
||||
eq(expected, nvim("list_uis"))
|
||||
|
||||
screen:detach()
|
||||
|
||||
@@ -1398,17 +1398,32 @@ describe('TUI', function()
|
||||
]]}
|
||||
end)
|
||||
|
||||
it('is included in nvim_list_uis()', function()
|
||||
feed_data(':echo map(nvim_list_uis(), {k,v -> sort(items(filter(v, {k,v -> k[:3] !=# "ext_" })))})\r')
|
||||
screen:expect([=[
|
||||
|
|
||||
{4:~ }|
|
||||
{5: }|
|
||||
[[['chan', 1], ['height', 6], ['override', v:false|
|
||||
], ['rgb', v:false], ['width', 50]]] |
|
||||
{10:Press ENTER or type command to continue}{1: } |
|
||||
{3:-- TERMINAL --} |
|
||||
]=])
|
||||
it('in nvim_list_uis()', function()
|
||||
local expected = {
|
||||
{
|
||||
chan = 1,
|
||||
ext_cmdline = false,
|
||||
ext_hlstate = false,
|
||||
ext_linegrid = true,
|
||||
ext_messages = false,
|
||||
ext_multigrid = false,
|
||||
ext_popupmenu = false,
|
||||
ext_tabline = false,
|
||||
ext_termcolors = true,
|
||||
ext_wildmenu = false,
|
||||
height = 6,
|
||||
override = false,
|
||||
rgb = false,
|
||||
stdin_tty = true,
|
||||
stdout_tty = true,
|
||||
term_background = '',
|
||||
term_colors = 256,
|
||||
term_name = 'xterm-256color', -- $TERM in :terminal.
|
||||
width = 50
|
||||
},
|
||||
}
|
||||
local _, rv = child_session:request('nvim_list_uis')
|
||||
eq(expected, rv)
|
||||
end)
|
||||
|
||||
it('allows grid to assume wider ambiguous-width characters than host terminal #19686', function()
|
||||
|
||||
Reference in New Issue
Block a user