aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorRonan Pigott <ronan@rjp.ie>2023-07-14 23:53:50 +0000
committerRonan Pigott <ronan@rjp.ie>2023-07-16 03:03:16 +0000
commitb7100d57160d2ae7a38d5517f1c2cd7155737d88 (patch)
tree94562102e5982602d8dcdd02b777134ee5a1db71 /terminal.c
parentchangelog: add new ‘unreleased’ section (diff)
render: use rounding for fractional scale
If we truncate the buffer dimensions we may accidentally submit a buffer with inappropriate size.
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/terminal.c b/terminal.c
index fff55019..485e8ca3 100644
--- a/terminal.c
+++ b/terminal.c
@@ -778,7 +778,10 @@ term_set_fonts(struct terminal *term, struct fcft_font *fonts[static 4])
sixel_cell_size_changed(term);
/* Use force, since cell-width/height may have changed */
- render_resize_force(term, term->width / term->scale, term->height / term->scale);
+ render_resize_force(
+ term,
+ round(term->width / term->scale),
+ round(term->height / term->scale));
return true;
}