-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Milestone
Description
Latest fish master (3.3.1-288-g139b74d8e)
Setting $fish_emoji_width overrides the guessed emoji width. This override is cached globally. Unsetting it does not clear the cache.
> string length -V \U0001F44D
2
> set fish_emoji_width 1
> string length -V \U0001F44D
1
> set -e fish_emoji_width
> string length -V \U0001F44D
1Another effect of this bug is that changing the variable in a local scope poisons the cache for the outer scope:
> string length -V \U0001F44D
2
> begin; set -l fish_emoji_width 1; string length -V string length -V \U0001F44D; end
1
> set -S fish_emoji_width
> string length -V \U0001F44D
1It looks like I can set fish_emoji_width to 0 and this will cause fish to fall back to using the cached emoji guess (assuming it already guessed at emoji prior to setting the variable). So the workaround here looks like set fish_emoji_width 1; set -e fish_emoji_width in order to clear the cached width and then clear the variable.