aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorAndrew J. Hesford <ajh@sideband.org>2024-08-14 14:35:58 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-08-20 05:07:29 +0000
commit1969717527a956483ba1c37aab3fcf7e8560e26a (patch)
treefb801a405a2151ec18357a86b4333fa2dff9cdc1 /terminal.c
parentrender: follow cursor.unfocused-style regardless of cursor.style (diff)
feature: add resize-keep-grid to allow text reflow on font changes
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/terminal.c b/terminal.c
index e7812e2e..dee0b038 100644
--- a/terminal.c
+++ b/terminal.c
@@ -819,11 +819,15 @@ term_set_fonts(struct terminal *term, struct fcft_font *fonts[static 4],
* render_resize() after this function */
if (resize_grid) {
/* Use force, since cell-width/height may have changed */
+ enum resize_options resize_opts = RESIZE_FORCE;
+ if (conf->resize_keep_grid)
+ resize_opts |= RESIZE_KEEP_GRID;
+
render_resize(
term,
(int)roundf(term->width / term->scale),
(int)roundf(term->height / term->scale),
- RESIZE_FORCE | RESIZE_KEEP_GRID);
+ resize_opts);
}
return true;
}