render: don’t center content while we’re being resized

Doing so causes the content to jump around while interactively
resizing the window.
This commit is contained in:
Daniel Eklöf 2021-01-10 15:40:33 +01:00
parent 4ebd58e388
commit 3948145d66
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -2671,7 +2671,7 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
const int total_x_pad = term->width - grid_width;
const int total_y_pad = term->height - grid_height;
if (term->conf->center) {
if (term->conf->center && !term->window->is_resizing) {
term->margins.left = total_x_pad / 2;
term->margins.top = total_y_pad / 2;
} else {