From 8ebc9553c3c1ea2140739281c52759f7bf7da94b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 19 Feb 2019 07:17:10 +0530 Subject: [PATCH] Report negative percentage adjustments of cell sizes Fixes #1394 --- kitty/config_data.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kitty/config_data.py b/kitty/config_data.py index 4688f8320..e8cc1ff90 100644 --- a/kitty/config_data.py +++ b/kitty/config_data.py @@ -223,7 +223,10 @@ o('font_size', 11.0, long_text=_('Font size (in pts)'), option_type=to_font_size def adjust_line_height(x): if x.endswith('%'): - return float(x[:-1].strip()) / 100.0 + ans = float(x[:-1].strip()) / 100.0 + if ans < 0: + log_error('Percentage adjustments of cell sizes must be positive numbers') + return 0 return int(x)