From e60b95d219b47b9498a8d9d6b6cd3b7c72e95d36 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 19 Feb 2025 05:41:16 +0530 Subject: [PATCH] Fix leading space in a cell text causing the cell to not be rendered --- kitty/fonts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kitty/fonts.c b/kitty/fonts.c index 7f4d3e721..5c74e94f8 100644 --- a/kitty/fonts.c +++ b/kitty/fonts.c @@ -723,8 +723,6 @@ START_ALLOW_CASE_RANGE ssize_t ans; switch(lc->chars[0]) { case 0: - case ' ': - case 0x2002: // en-space case '\t': case IMAGE_PLACEHOLDER_CHAR: return BLANK_FONT; @@ -742,6 +740,7 @@ START_ALLOW_CASE_RANGE if (allow_use_of_box_fonts) return BOX_FONT; /* fallthrough */ default: + if (lc->count == 1 && (lc->chars[0] == ' ' || lc->chars[0] == 0x2002 /* en-space */)) return BLANK_FONT; *is_emoji_presentation = has_emoji_presentation(cpu_cell, lc); ans = in_symbol_maps(fg, lc->chars[0]); if (ans > -1) return ans;