diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2024-07-21 21:47:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-21 21:47:37 -0500 |
commit | f93ecd2760f5859fd5eeec28c7c2196ece98e9a1 (patch) | |
tree | d481d1220ebe4196ef754352272b25fd618dd77a /runtime/lua/vim | |
parent | 7381f0a1d517474dcf8d8d019cbda430ce4bff23 (diff) | |
download | rneovim-f93ecd2760f5859fd5eeec28c7c2196ece98e9a1.tar.gz rneovim-f93ecd2760f5859fd5eeec28c7c2196ece98e9a1.tar.bz2 rneovim-f93ecd2760f5859fd5eeec28c7c2196ece98e9a1.zip |
feat(tui): parse CSI subparams in termkey (#29805)
libtermkey does not know how to parse CSI subparameters (parameters
separated by ':', ASCII 0x3A) and currently just ignores them. However,
many important CSI sequences sent by the terminal make use of
subparameters, most notably key events when using the kitty keyboard
protocol [1]. Enabling subparameters is a prerequisite for expanding
kitty keyboard protocol support in Neovim.
Concretely, we do this by returning pointers into the internal termkey
buffer for each CSI parameter rather than parsing them into integers
directly. When a caller wants to actually use the parameter as an
integer, they must call termkey_interpret_csi_param, which parses the
full parameter string into an integer parameter and zero or more
subparameters.
The pointers into the internal buffer will become invalidated when new
input arrives from the terminal so it is important that the individual
params are used and parsed right away. All of our code (and libtermkey's
code) does this, so this is fine for now, but is something to keep in
mind moving forward.
[1]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
Diffstat (limited to 'runtime/lua/vim')
0 files changed, 0 insertions, 0 deletions