mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
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
This commit is contained in:
parent
6571c84d54
commit
6048e95f33
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user