aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta/api.lua
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2023-11-06 12:42:40 -0600
committerGitHub <noreply@github.com>2023-11-06 12:42:40 -0600
commit56627ca2423e9d6084f87f5bc4639f06d10ecf91 (patch)
tree98926016c96ef66a6c6e27b339e0c3450180af50 /runtime/lua/vim/_meta/api.lua
parentf9416470b15b3601c5b2d805a8cf3bdabd44a567 (diff)
downloadrneovim-56627ca2423e9d6084f87f5bc4639f06d10ecf91.tar.gz
rneovim-56627ca2423e9d6084f87f5bc4639f06d10ecf91.tar.bz2
rneovim-56627ca2423e9d6084f87f5bc4639f06d10ecf91.zip
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
Diffstat (limited to 'runtime/lua/vim/_meta/api.lua')
-rw-r--r--runtime/lua/vim/_meta/api.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua
index 691da62f4f..0bee27970d 100644
--- a/runtime/lua/vim/_meta/api.lua
+++ b/runtime/lua/vim/_meta/api.lua
@@ -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