From e9ee1820d6e08e09dd2e1dd9f9aaf908a88ae187 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 17 Aug 2021 12:53:19 +0200 Subject: [PATCH] Default emoji width to 2 for iTerm Hallelujah, they switched to Unicode 9. See #8220. --- src/env_dispatch.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/env_dispatch.cpp b/src/env_dispatch.cpp index 1258bb803..b4c43a2cd 100644 --- a/src/env_dispatch.cpp +++ b/src/env_dispatch.cpp @@ -175,10 +175,9 @@ static void guess_emoji_width(const environment_t &vars) { g_guessed_fish_emoji_width = 2; FLOGF(term_support, "default emoji width: 2 for %ls", term.c_str()); } else if (term == L"iTerm.app") { - // iTerm2 defaults to Unicode 8 sizes. - // See https://gitlab.com/gnachman/iterm2/wikis/unicodeversionswitching - g_guessed_fish_emoji_width = 1; - FLOGF(term_support, "default emoji width: 1"); + // iTerm2 now defaults to Unicode 9 sizes for anything after macOS 10.12. + g_guessed_fish_emoji_width = 2; + FLOGF(term_support, "default emoji width for iTerm: 2"); } else { // Default to whatever system wcwidth says to U+1F603, // but only if it's at least 1.