From 5726466db37f79882a00601544345ab22777f5c1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 14 Feb 2019 10:22:45 +0530 Subject: [PATCH] Ensure cells are at least 2 pixels wide User could specify adjust_column_width to make cells too naroow otherwise --- kitty/fonts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kitty/fonts.c b/kitty/fonts.c index 51b6b8d17..f000d0e30 100644 --- a/kitty/fonts.c +++ b/kitty/fonts.c @@ -397,6 +397,7 @@ calc_cell_metrics(FontGroup *fg) { if (OPT(adjust_line_height_frac) != 0.f) cell_height *= OPT(adjust_line_height_frac); if (OPT(adjust_column_width_px != 0)) cell_width += OPT(adjust_column_width_px); if (OPT(adjust_column_width_frac) != 0.f) cell_width *= OPT(adjust_column_width_frac); + cell_width = MAX(2, cell_width); int line_height_adjustment = cell_height - before_cell_height; if (cell_height < 4) fatal("line height too small after adjustment"); if (cell_height > 1000) fatal("line height too large after adjustment");