Inserting overwrites existing text in C shell on FreeBSD #7174

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

Originally created by @Lombra on GitHub (Mar 27, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.720]

Steps to reproduce

  • SSH into a FreeBSD machine that uses C shell.
  • Start typing a command in the prompt.
  • Move the cursor back to any point before the end of the pending prompt command.
  • Start typing.

Expected behavior

Text is inserted at the cursor position.

Actual behavior

Text overwrites existing text as it is written. It only appears overwritten, however, as pressing enter reveals that the command is executed as though the text was inserted correctly without overwriting. Furthermore, moving the cursor back to the end of the text reveals the "real" text as the cursor moves over it.

Both the console and WSL exhibits the same behavior. PuTTY does not.

The issue does not occur when using Bash instead of C shell on the target machine.

Here are some other people having the same issue on FreeBSD machines.
https://github.com/microsoft/WSL/issues/1756#issuecomment-335611423

Originally created by @Lombra on GitHub (Mar 27, 2020). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18363.720] ``` # Steps to reproduce - SSH into a FreeBSD machine that uses C shell. - Start typing a command in the prompt. - Move the cursor back to any point before the end of the pending prompt command. - Start typing. # Expected behavior Text is inserted at the cursor position. # Actual behavior Text overwrites existing text as it is written. It only appears overwritten, however, as pressing enter reveals that the command is executed as though the text was inserted correctly without overwriting. Furthermore, moving the cursor back to the end of the text reveals the "real" text as the cursor moves over it. Both the console and WSL exhibits the same behavior. PuTTY does not. The issue does not occur when using Bash instead of C shell on the target machine. Here are some other people having the same issue on FreeBSD machines. https://github.com/microsoft/WSL/issues/1756#issuecomment-335611423
claunia added the Area-VTResolution-Duplicate labels 2026-01-31 00:57:04 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 27, 2020):

If you have access to the script utility, can you capture a script? We can't troubleshoot this without knowing exactly what VT sequences the shell is emitting. 😄 Thanks!

@DHowett-MSFT commented on GitHub (Mar 27, 2020): If you have access to the `script` utility, can you capture a script? We can't troubleshoot this without knowing exactly what VT sequences the shell is emitting. :smile: Thanks!
Author
Owner

@Lombra commented on GitHub (Mar 27, 2020):

Here I typed echo "hello world", and then went back to insert new before the w.

Script started on Sat Mar 28 00:03:53 2020
root@LP50:~ # echo "hello world"^H^H^H^H^H^H^[[4hn^[[4l^[[4he^[[4lw^[[4hw^[[4l^H^[[4h ^[[4l^M
hello new world
root@LP50:~ # ^D^H^Hexit

Script done on Sat Mar 28 00:04:11 2020
@Lombra commented on GitHub (Mar 27, 2020): Here I typed `echo "hello world"`, and then went back to insert `new` before the `w`. ``` Script started on Sat Mar 28 00:03:53 2020 root@LP50:~ # echo "hello world"^H^H^H^H^H^H^[[4hn^[[4l^[[4he^[[4lw^[[4hw^[[4l^H^[[4h ^[[4l^M hello new world root@LP50:~ # ^D^H^Hexit Script done on Sat Mar 28 00:04:11 2020 ```
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 27, 2020):

/dup #1947 😄 thanks!

@DHowett-MSFT commented on GitHub (Mar 27, 2020): /dup #1947 :smile: thanks!
Author
Owner

@ghost commented on GitHub (Mar 27, 2020):

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 (Mar 27, 2020): 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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7174