mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 08:11:15 -03:00
Remove guessed_emoji_width
Just guess anew when it's not set. (this still uses the value of $fish_emoji_width, but clamped to 1 or 2 - we could also guess if it's an unusable value, but that's a different issue and tbh this variable is becoming less and less useful as time moves on and things move to the new widths by default) Fixes #8274.
This commit is contained in:
@@ -221,17 +221,12 @@ int killpg(int pgr, int sig) {
|
||||
int g_fish_ambiguous_width = 1;
|
||||
|
||||
// Width of emoji characters.
|
||||
int g_fish_emoji_width = 0;
|
||||
|
||||
// 1 is the typical emoji width in Unicode 8.
|
||||
int g_guessed_fish_emoji_width = 1;
|
||||
int g_fish_emoji_width = 1;
|
||||
|
||||
static int fish_get_emoji_width(wchar_t c) {
|
||||
(void)c;
|
||||
// Respect an explicit value. If we don't have one, use the guessed value. Do not try to fall
|
||||
// back to wcwidth(), it's hopeless.
|
||||
if (g_fish_emoji_width > 0) return g_fish_emoji_width;
|
||||
return g_guessed_fish_emoji_width;
|
||||
return g_fish_emoji_width;
|
||||
}
|
||||
|
||||
// Big hack to use our versions of wcswidth where we know them to be broken, which is
|
||||
|
||||
Reference in New Issue
Block a user