patch 9.1.1703: Cannot react to terminal OSC responses

Problem:  Cannot react to terminal OSC responses
Solution: Allow TermResponseAll to be triggered by Terminal OSC
          responses (Foxe Chen)

fixes: #14995
closes: #17975

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Foxe Chen
2025-08-27 21:15:47 +02:00
committed by Christian Brabandt
parent 7f380259cf
commit 1f51bbc3b9
30 changed files with 404 additions and 303 deletions

View File

@ -1306,22 +1306,32 @@ TermResponse After the response to |t_RV| is received from
takes time is involved.
*TermResponseAll*
TermResponseAll After the response to |t_RV|, |t_RC|, |t_RS|,
|t_RB|, |t_RF|, or |t_u7| are received from
|t_u7| or any OSC command are received from
the terminal. The value of |v:termresponse|,
|v:termblinkresp|, |v:termstyleresp|,
|v:termrbgresp|, |v:termrfgresp|, and
|v:termu7resp|, correspondingly, can be used.
<amatch> will be set to any of:
|v:termu7resp|, and |v:termosc|
correspondingly, can be used. <amatch> will
be set to any of:
"version",
"cursorblink",
"cursorshape",
"background",
"foreground",
"ambiguouswidth"
"osc"
Note that this event may be triggered halfway
executing another event, especially if file I/O,
a shell command or anything else that takes time
is involved.
Note: Traditionally, TermResponseAll was also
used for "foreground" and "background"
patterns. These are now handled as part of
the "osc" value. For backwards compatibility,
the $VIMRUNTIME/plugin/colorresp.vim plugin
will handle "osc" events and emit
TermResponseAll autocommand events when it
encounters "foreground" and "background"
values.
*TextChanged*
TextChanged After a change was made to the text in the
current buffer in Normal mode. That is after