Skip to content

Prompt glitches with emojis #7237

Closed
Closed
@TheEdoRan

Description

@TheEdoRan

Environment

Fish version: 3.1.2
OS: Arch Linux
Terminal: kitty, via tmux

Computer is an ASUS VivoBook Pro N580GD, with Intel graphics + NVIDIA GTX 1050. I use nvidia-prime package, which automatically configures offloading. I almost exclusively use integrated graphics only (these tests were made with integrated graphics).

Bug

fish_emoji_bug

When pasting emojis (it could happen with other unicode characters), viewing history or triggering completion with them, the prompt glitches and it's impossible to see which characters are being typed (in case of completion).

Tests

  • The first test had the fish_emoji_width variable set to 1; with this configuration, prompt behaves as it should with emojis like flags (which I think are double width), but emojis like faces mess it up, duplicating characters.

  • The second test had the fish_emoji_width variable set to 2 (the default); with this configuration, prompt behaves as it should with emojis like faces (single width), but messes up with double-width, like flags.

Additional information

Plugins/other modifications

I use fisher as a plugin manager, with several plugins and some configuration put in ~/.config/fish/conf.d folder.
I tried removing all the content from ~/.config/fish and from ~/.local/share/fish.

The tests had the same results with no configuration and the default fish prompt.

Fonts

  • Emoji font is noto-fonts-emoji, but I tried with ttf-joypixels too. I also tried completely uninstalling emoji fonts, and viewing history, the prompt behaves incorrectly anyway.
  • Monospace font is Hack Nerd Font, but I made the same tests with several other fonts, including non-nerd fonts ones, with the same exact results.

Terminal

In these tests I used kitty terminal, but I tried with Alacritty and gnome-terminal too. I also tried with/without tmux, all with the same exact results.

Locale

Output of locale command:

LC_CTYPE="it_IT.UTF-8"
LC_NUMERIC="it_IT.UTF-8"
LC_TIME="it_IT.UTF-8"
LC_COLLATE="it_IT.UTF-8"
LC_MONETARY="it_IT.UTF-8"
LC_MESSAGES="it_IT.UTF-8"
LC_PAPER="it_IT.UTF-8"
LC_NAME="it_IT.UTF-8"
LC_ADDRESS="it_IT.UTF-8"
LC_TELEPHONE="it_IT.UTF-8"
LC_MEASUREMENT="it_IT.UTF-8"
LC_IDENTIFICATION="it_IT.UTF-8"
LC_ALL=

I also tried with en_US.UTF-8 set as locale, with the same results.

Other shells

I made the same tests (history, normal typing, but no completion) with bash and zsh too.
The glitch does not occur in any of these other shells.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions