Skip to content

Diff with Emoji causes doubled characters on scroll #4854

Description

@niklasravnsborg

Describe the bug

When adding certain kinds of emoji to a file and scrolling in the git diff, characters at the end of surrounding lines get duplicated to the top and bottom.

To Reproduce

Steps to reproduce the behavior:

  1. Create a new git repo
  2. Paste the some-build-workflow.yml file
  3. Scroll down and then up again while hovering over "Unstaged Changes" pane
  4. See duplicated characters

Screenshots

Image

Version info:

  • commit=, build date=, build source=nix, version=0.54.2, os=darwin, arch=arm64, git version=2.50.1
  • git version 2.50.1
  • Saw it in kitty and Ghostty

Additional context

I think the emoji I'm using in my example has a slightly different Unicode signature than the default emoji: 📝️ and 📝. The first one causes these problems, the second one doesn't. There seems to be some kind of invisible character behind the first emoji. When I paste it in zsh I see 📝<fe0f>. In fish and all my editors I don't see it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions