Emoji in Ubuntu shell are not deleted correctly #8893

Open
opened 2026-01-31 01:40:39 +00:00 by claunia · 0 comments
Owner

Originally created by @ivanjonas on GitHub (Jun 8, 2020).

Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 1.0.1401.0

Any other software?

Steps to reproduce

  1. Open an Ubuntu/bash window
  2. Note the position of the cursor.
  3. Type the word "git"
  4. Open the Windows emoji picker with Win + period and choose an emoji. For example, the "smiling face with smiling eyes" emoji (😊) or any other emoji that isn't part of the original windows black-and-white emoji set. For contrast, the recycle (♻) emoji does not show this problem because it's part of that set.
  5. Press backspace once to delete the emoji. Notice that the emoji is still visible but the cursor is in the middle of it.
  6. Press backspace again to "finish" deleting the emoji. The original text "git" will still be visible.
  7. Press Enter.

Expected behavior

The git program runs outputting information about subcommands.
If I delete an emoji character that takes up two blocks of space, I expect the cursor to go backward two spaces, and I expect that pressing Enter will execute the command that is displayed.

Actual behavior

The command prompt complains "gi: command not found", even though the line above still says "git"

image

Deleting double-width emoji will move the cursor back only one space, and the displayed command is be the command that will be executed.

Originally created by @ivanjonas on GitHub (Jun 8, 2020). # Environment ```none Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): 1.0.1401.0 Any other software? ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> 1. Open an Ubuntu/bash window 2. Note the position of the cursor. 3. Type the word "git" 4. Open the Windows emoji picker with Win + period and choose an emoji. For example, the "smiling face with smiling eyes" emoji (😊) or any other emoji that isn't part of the original windows black-and-white emoji set. For contrast, the recycle (♻) emoji does not show this problem because it's part of that set. 5. Press backspace once to delete the emoji. Notice that the emoji is still visible but the cursor is in the middle of it. 6. Press backspace again to "finish" deleting the emoji. The original text "git" will still be visible. 7. Press Enter. # Expected behavior The `git` program runs outputting information about subcommands. If I delete an emoji character that takes up two blocks of space, I expect the cursor to go backward two spaces, and I expect that pressing Enter will execute the command that is displayed. # Actual behavior The command prompt complains "gi: command not found", even though the line above still says "git" ![image](https://user-images.githubusercontent.com/4935079/83986113-a833fa80-a909-11ea-9d87-93310ec476be.png) Deleting double-width emoji will move the cursor back only one space, and the displayed command is be the command that will be executed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8893