diff options
| author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2024-07-19 08:29:29 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-19 13:29:29 +0000 |
| commit | e41368f3bc1d08d900425608bd199f585d6fce59 (patch) | |
| tree | abbdf252a3a0b8e4b7f0c006494d29e6ba021773 /src/nvim/tui/input.c | |
| parent | d8aee77a4e74b0ac886fee1b29f719314051f39c (diff) | |
| download | rneovim-e41368f3bc1d08d900425608bd199f585d6fce59.tar.gz rneovim-e41368f3bc1d08d900425608bd199f585d6fce59.tar.bz2 rneovim-e41368f3bc1d08d900425608bd199f585d6fce59.zip | |
feat(tui): support in-band resize events (#29791)
DEC mode 2048 is a newly proposed private mode for sending resize events
in band to applications from the terminal emulator, instead of relying
on SIGWINCH.
Full text of the specification is here:
https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83
Diffstat (limited to 'src/nvim/tui/input.c')
| -rw-r--r-- | src/nvim/tui/input.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c index a5768cfc06..9f58607bf7 100644 --- a/src/nvim/tui/input.c +++ b/src/nvim/tui/input.c @@ -638,6 +638,15 @@ static void handle_unknown_csi(TermInput *input, const TermKeyKey *key) break; } break; + case 't': + if (nargs == 5 && args[0] == 48) { + // In-band resize event (DEC private mode 2048) + int height_chars = (int)args[1]; + int width_chars = (int)args[2]; + tui_set_size(input->tui_data, width_chars, height_chars); + ui_client_set_size(width_chars, height_chars); + } + break; default: break; } |