mirror of
https://github.com/neovim/neovim.git
synced 2025-12-04 21:52:41 +00:00
feat(tui): use TermResponse event for OSC responses (#25868)
When the terminal emulator sends an OSC sequence to Nvim (as a response to another OSC sequence that was first sent by Nvim), populate the OSC sequence in the v:termresponse variable and fire the TermResponse event. The escape sequence is also included in the "data" field of the autocommand callback when the autocommand is defined in Lua. This makes use of the already documented but unimplemented TermResponse event. This event exists in Vim but is only fired when Vim receives a primary device attributes response. Fixes: https://github.com/neovim/neovim/issues/25856
This commit is contained in:
11
runtime/lua/vim/_meta/api.lua
generated
11
runtime/lua/vim/_meta/api.lua
generated
@@ -2059,6 +2059,17 @@ function vim.api.nvim_ui_set_focus(gained) end
|
||||
--- @param value any
|
||||
function vim.api.nvim_ui_set_option(name, value) end
|
||||
|
||||
--- Tells Nvim when a terminal event has occurred.
|
||||
--- The following terminal events are supported:
|
||||
---
|
||||
--- • "osc_response": The terminal sent a OSC response sequence to Nvim. The
|
||||
--- payload is the received OSC sequence.
|
||||
---
|
||||
---
|
||||
--- @param event string Event name
|
||||
--- @param value any
|
||||
function vim.api.nvim_ui_term_event(event, value) end
|
||||
|
||||
--- @param width integer
|
||||
--- @param height integer
|
||||
function vim.api.nvim_ui_try_resize(width, height) end
|
||||
|
||||
Reference in New Issue
Block a user