Search in Git/mingw nano mangles text ("←[?1h") #15051

Closed
opened 2026-01-31 04:27:02 +00:00 by claunia · 4 comments
Owner

Originally created by @xnoreq on GitHub (Sep 1, 2021).

Windows Terminal version (or Windows build number)

10.0.19043.0, 1.11.2421.0

Other Software

Git-2.33.0.2-64-bit with support for pseudo-consoles enabled

Steps to reproduce

echo asdf > test.txt
nano test.txt

Now press Ctrl+W (search), enter "asdf" (without quotes), press return.

Expected Behavior

No change to text in nano.

Actual Behavior

"asdf" is replaced by "←[?1h". After a second, the text automatically changes to "←[?1hasdf". Pressing right reveals "asdf" character by character.

Pressing right once before the second has passed results in "a[?1h←[?1h←[?1h←[?1hasdf".

Originally created by @xnoreq on GitHub (Sep 1, 2021). ### Windows Terminal version (or Windows build number) 10.0.19043.0, 1.11.2421.0 ### Other Software Git-2.33.0.2-64-bit with support for pseudo-consoles enabled ### Steps to reproduce ``` echo asdf > test.txt nano test.txt ``` Now press Ctrl+W (search), enter "asdf" (without quotes), press return. ### Expected Behavior No change to text in nano. ### Actual Behavior "asdf" is replaced by "←[?1h". After a second, the text automatically changes to "←[?1hasdf". Pressing right reveals "asdf" character by character. Pressing right once before the second has passed results in "a[?1h←[?1h←[?1h←[?1hasdf".
claunia added the Resolution-Duplicate label 2026-01-31 04:27:02 +00:00
Author
Owner

@DHowett commented on GitHub (Sep 1, 2021):

This is the classic behavior of an application that has told us to stop handling escape sequences. I'm guessing it's either nano or the MSYS2 runtime (Cygwin)...

@DHowett commented on GitHub (Sep 1, 2021): This is the classic behavior of an application that has told us to _stop handling escape sequences_. I'm guessing it's either nano or the MSYS2 runtime (Cygwin)...
Author
Owner

@zadjii-msft commented on GitHub (Sep 15, 2021):

Oh look, the dupe from the backlog: /dup #9312

@zadjii-msft commented on GitHub (Sep 15, 2021): Oh look, the dupe from the backlog: /dup #9312
Author
Owner

@ghost commented on GitHub (Sep 15, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Sep 15, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@zadjii-msft commented on GitHub (Sep 15, 2021):

Which might also be #4921

@zadjii-msft commented on GitHub (Sep 15, 2021): Which might also be #4921
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15051