From 3948145d66892d7055f47ace9ed6474344b5c119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 10 Jan 2021 15:40:33 +0100 Subject: [PATCH] =?UTF-8?q?render:=20don=E2=80=99t=20center=20content=20wh?= =?UTF-8?q?ile=20we=E2=80=99re=20being=20resized?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Doing so causes the content to jump around while interactively resizing the window. --- render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/render.c b/render.c index e45140e5..8ad5ee0c 100644 --- a/render.c +++ b/render.c @@ -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 {