From 6048e95f33161420f9d863a2ce5ccf9464df2dba Mon Sep 17 00:00:00 2001 From: Felipe Morales Date: Sat, 18 Jul 2015 17:13:01 -0300 Subject: [PATCH] tui: send resize sequences to the terminal Neither setting the 'columns' and 'lines' options nor using the `:winsize` command resized the terminal window, which caused display glitches. Re: #2863 --- src/nvim/tui/tui.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 1deab23b05..c8565a1e5a 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -350,6 +350,11 @@ static void tui_resize(UI *ui, int width, int height) data->scroll_region.left = 0; data->scroll_region.right = width - 1; data->row = data->col = 0; + + // try to resize the terminal window + char r[16]; // enough for 9999x9999 + snprintf(r, sizeof(r), "\x1b[8;%d;%dt", height, width); + out(ui, r, strlen(r)); } static void tui_clear(UI *ui)