mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
feat(tui): add nvim_ui_send (#35406)
This function allows the Nvim core to write arbitrary data to a TTY connected to a UI's stdout.
This commit is contained in:
@@ -211,9 +211,9 @@ local function try_query_terminal_color(color)
|
||||
end,
|
||||
})
|
||||
if type(color) == 'number' then
|
||||
io.stdout:write(('\027]%s;%s;?\027\\'):format(parameter, color))
|
||||
vim.api.nvim_ui_send(('\027]%s;%s;?\027\\'):format(parameter, color))
|
||||
else
|
||||
io.stdout:write(('\027]%s;?\027\\'):format(parameter))
|
||||
vim.api.nvim_ui_send(('\027]%s;?\027\\'):format(parameter))
|
||||
end
|
||||
vim.wait(100, function()
|
||||
return hex and true or false
|
||||
|
||||
Reference in New Issue
Block a user