Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoji in commit log cause extra characters right after the emoji #3514

Open
Yinzo opened this issue Apr 22, 2024 · 1 comment
Open

Emoji in commit log cause extra characters right after the emoji #3514

Yinzo opened this issue Apr 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Yinzo
Copy link

Yinzo commented Apr 22, 2024

Describe the bug
When using emoji in commit log, the following character will sometimes display twice.

To Reproduce
Steps to reproduce the behavior:

  1. Use emoji in commit log, I use these at the commit logs beginning: 🚧 🧹 🔧 🏷️
  2. In the Commits section, when the commit logs are selected by the cursor, irregular extra characters appear right after the emoji. (pic 1)
  3. And if you use Enter to go into the commit, the issue might be easier to observe. (pic 2)
  4. I have added an extra space after the emoji; otherwise, it will look like pic 3, the first commit log.
  5. Also, the emoji causes the view border to display incorrectly. (pic 4)

Seems like the width calculation issue about Unicode Emoji.

Expected behavior
Not showing extra characters and calculate the Emoji's width correctly.
Here is the correct display in vim:
image

Screenshots

image image image image

Version info:
Run lazygit --version and paste the result here

commit=3675570a391b1a49ddd198b4c7e71e17701d4404, build date=2024-03-23T09:09:11Z, build source=binaryRelease, version=0.41.0, os=darwin, arch=arm64, git version=2.39.3 (Apple Git-146)

Run git --version and paste the result here

git version 2.39.3 (Apple Git-146)

Additional context

The screenshots pic 1 to pic 3 is from a older version lazygit, pic 4 is the latest version. Here is the older version's info:

commit=5e388e21c8ca6aa883dbcbe45c47f6fdd5116815, build date=2023-08-07T14:05:48Z, build source=binaryRelease, version=0.40.2, os=darwin, arch=arm64, git version=2.39.3 (Apple Git-146)

One sample commit log for debugging:
🏷️ Update Version Number to v2.7.0(195)

Note: please try updating to the latest version or manually building the latest master to see if the issue still occurs.

@Yinzo Yinzo added the bug Something isn't working label Apr 22, 2024
@Yinzo
Copy link
Author

Yinzo commented Apr 22, 2024

image The latest version seems to also have a cursor position issue when typing emojis in the commit log, which is normal in the older version I have mentioned. The correct cursor position should be one character leading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant