feat(term): trigger TermRequest for APC (#32407)

Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
Till Bungert
2025-02-13 15:24:01 +01:00
committed by GitHub
parent e4c6e732fd
commit 93480f7fba
7 changed files with 67 additions and 16 deletions

View File

@@ -1004,8 +1004,8 @@ TermClose When a |terminal| job ends.
Sets these |v:event| keys:
status
*TermRequest*
TermRequest When a |:terminal| child process emits an OSC
or DCS sequence. Sets |v:termrequest|. The
TermRequest When a |:terminal| child process emits an OSC,
DCS or APC sequence. Sets |v:termrequest|. The
|event-data| is the request string.
*TermResponse*
TermResponse When Nvim receives an OSC or DCS response from

View File

@@ -372,6 +372,8 @@ TERMINAL
• The |terminal| has experimental support for the Kitty keyboard protocol
(sometimes called "CSI u" key encoding). Only the "Disambiguate escape
codes" mode is currently supported.
• The |terminal| emits a |TermRequest| autocommand event when the child process
emits an APC control sequence.
TREESITTER

View File

@@ -663,7 +663,7 @@ v:t_string Value of |String| type. Read-only. See: |type()|
*v:termrequest* *termrequest-variable*
v:termrequest
The value of the most recent OSC or DCS control sequence
The value of the most recent OSC, DCS or APC control sequence
sent from a process running in the embedded |terminal|.
This can be read in a |TermRequest| event handler to respond
to queries from embedded applications.

View File

@@ -700,7 +700,7 @@ vim.v.t_number = ...
--- @type integer
vim.v.t_string = ...
--- The value of the most recent OSC or DCS control sequence
--- The value of the most recent OSC, DCS or APC control sequence
--- sent from a process running in the embedded `terminal`.
--- This can be read in a `TermRequest` event handler to respond
--- to queries from embedded applications.