mirror of
https://github.com/neovim/neovim.git
synced 2026-01-05 02:47:28 +10: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:
@@ -839,7 +839,7 @@ do
|
||||
end,
|
||||
})
|
||||
|
||||
io.stdout:write('\027]11;?\007')
|
||||
vim.api.nvim_ui_send('\027]11;?\007')
|
||||
end
|
||||
|
||||
--- If the TUI (term_has_truecolor) was able to determine that the host
|
||||
@@ -927,7 +927,7 @@ do
|
||||
local decrqss = '\027P$qm\027\\'
|
||||
|
||||
-- Reset attributes first, as other code may have set attributes.
|
||||
io.stdout:write(string.format('\027[0m\027[48;2;%d;%d;%dm%s', r, g, b, decrqss))
|
||||
vim.api.nvim_ui_send(string.format('\027[0m\027[48;2;%d;%d;%dm%s', r, g, b, decrqss))
|
||||
|
||||
timer:start(1000, 0, function()
|
||||
-- Delete the autocommand if no response was received
|
||||
|
||||
Reference in New Issue
Block a user