aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-11-24 16:09:31 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-11-24 16:09:31 +0000
commite85257bcae116f5e6148e38690e2ec95b586d451 (patch)
treedeb386de941170f9f5cf4d29a11caa796f04d6c1
parentterm: update user-set line-height just before calculating the cell dimensions (diff)
term: initialize term->font_line_height when there’s no user-set line-height
-rw-r--r--terminal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/terminal.c b/terminal.c
index 3af436a4..429a4cc3 100644
--- a/terminal.c
+++ b/terminal.c
@@ -709,8 +709,11 @@ term_line_height_update(struct terminal *term)
{
const struct config *conf = term->conf;
- if (term->conf->line_height.px < 0)
+ if (term->conf->line_height.px < 0) {
+ term->font_line_height.pt = 0;
+ term->font_line_height.px = -1;
return;
+ }
const float dpi = term->font_is_sized_by_dpi ? term->font_dpi : 96.;