aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tui/input.c
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2024-07-19 08:29:29 -0500
committerGitHub <noreply@github.com>2024-07-19 13:29:29 +0000
commite41368f3bc1d08d900425608bd199f585d6fce59 (patch)
treeabbdf252a3a0b8e4b7f0c006494d29e6ba021773 /src/nvim/tui/input.c
parentd8aee77a4e74b0ac886fee1b29f719314051f39c (diff)
downloadrneovim-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.c9
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;
}