Multi-byte chars not erased correctly by backspace in Git Bash #19803

Open
opened 2026-01-31 06:54:01 +00:00 by claunia · 0 comments
Owner

Originally created by @ap-axentia on GitHub (May 4, 2023).

Windows Terminal version

1.16.10262.0

Windows build number

10.0.22621.1555

Other Software

Git Bash (Git for Windows), git version 2.40.1.windows.1
Git Bash in Windows Terminal installed with Git for Windows installer checkbox option.

Steps to reproduce

Install Git for Windows, check the box to add it to Windows Terminal.
Open Windows Terminal Git Bash.
Type a character that use more than one byte, eg. £ or ö.
Use backspace to erase the char.

(I am unsure if the issue lies with Windows Terminal or Git for Windows, but I cannot reproduce the same bug in git-bash.exe so that is why I opened the issue here.)

Expected Behavior

The char is erased fully, so that no trace of it is left neither visually nor in the background.

Actual Behavior

The char is erased visually, but something seems to still be left in the background. When pressing backspace again a char of the prompt is removed. Or, if not pressing backspace again, when pressing enter, the response bash: □: command not found is given, where one would expect no response.

image

Originally created by @ap-axentia on GitHub (May 4, 2023). ### Windows Terminal version 1.16.10262.0 ### Windows build number 10.0.22621.1555 ### Other Software Git Bash (Git for Windows), git version 2.40.1.windows.1 Git Bash in Windows Terminal installed with Git for Windows installer checkbox option. ### Steps to reproduce Install Git for Windows, check the box to add it to Windows Terminal. Open Windows Terminal Git Bash. Type a character that use more than one byte, eg. `£` or `ö`. Use backspace to erase the char. (I am unsure if the issue lies with Windows Terminal or Git for Windows, but I cannot reproduce the same bug in git-bash.exe so that is why I opened the issue here.) ### Expected Behavior The char is erased fully, so that no trace of it is left neither visually nor in the background. ### Actual Behavior The char is erased visually, but something seems to still be left in the background. When pressing backspace again a char of the prompt is removed. Or, if not pressing backspace again, when pressing enter, the response `bash: □: command not found` is given, where one would expect no response. ![image](https://user-images.githubusercontent.com/104353026/236152133-78309703-2d17-4432-8591-5130aaad605e.png)
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 06:54:01 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19803