From 05e91fa9df2fb0b34eea1a82a521b5544580f3f8 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 12 Aug 2019 21:32:38 +0200 Subject: output: resize on scale changes --- render.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'render.c') diff --git a/render.c b/render.c index ee45b96b..d6f4a5de 100644 --- a/render.c +++ b/render.c @@ -675,16 +675,22 @@ reflow(struct row **new_grid, int new_cols, int new_rows, /* Move to terminal.c? */ void -render_resize(struct terminal *term, int width, int height) +render_resize(struct terminal *term, int width, int height, int scale) { width *= term->scale; height *= term->scale; - if (width == term->width && height == term->height) + if (width == 0 && height == 0) { + /* Assume we're not fully up and running yet */ + return; + } + + if (width == term->width && height == term->height && scale == term->scale) return; term->width = width; term->height = height; + term->scale = scale; const int scrollback_lines = term->render.scrollback_lines; -- cgit v1.3