aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-15 09:38:13 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-15 09:38:13 +0000
commit9eb9a3d8a545b8307edcd283744fb7bc63e40ee6 (patch)
treeb7e11b16dc8ccc8ce563e61a4e83fd3bcf7bab40 /terminal.c
parentRevert "wiki: testing" (diff)
parentadded font-size limitting to changelog (diff)
Merge pull request 'limit font size to non-negative values'
Closes https://codeberg.org/dnkl/foot/issues/38
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/terminal.c b/terminal.c
index 40bfbc90..84c9d459 100644
--- a/terminal.c
+++ b/terminal.c
@@ -1430,7 +1430,7 @@ term_font_size_adjust(struct terminal *term, double amount)
old_pt_size = term->font_sizes[i].px_size * 72. / dpi;
}
- term->font_sizes[i].pt_size = old_pt_size + amount;
+ term->font_sizes[i].pt_size = fmax(old_pt_size + amount, 0);
term->font_sizes[i].px_size = -1;
}