3-line commands that scrolled the window in powershell visually duplicate if partially deleted #17446

Open
opened 2026-01-31 05:42:48 +00:00 by claunia · 0 comments
Owner

Originally created by @omgitsraven on GitHub (May 10, 2022).

Windows Terminal version

1.12.10982.0

Windows build number

10.0.19044.0

Other Software

No response

Steps to reproduce

  1. Open Windows Terminal
  2. Open a Powershell terminal
  3. Press the enter key repeatedly, until the content of the window begins to scroll (so that the active prompt is at the bottom of the window.)
  4. Type a command that wraps onto three lines, but do not hit enter. (The command doesn't have to be valid, you can just hold down the q key.)
  5. Start deleting characters with the backspace key, until the command should fit onto two lines. (Go slightly past it fitting exactly; make some empty space on the end of the second line.)

Expected Behavior

You should see a two-line-long command after your prompt.

Actual Behavior

Once you delete enough characters to fit exactly on two lines, the window scrolls up for some reason... And then, once you delete one character MORE than that, the first two lines visually mash up to create a command that appears to still be three lines long! (The command actually still runs normally, it's just very confusing to edit...)

Here is an example, where I filled the first line with as, the second line with bs, and the third line with cs, and then deleted the third line and some of the second:

Before deleting anything:
image

After pressing backspace several times:
image

Also, note that this happens in Powershell running inside Windows Terminal, but NOT when attempted in the standalone Powershell prompt.

Originally created by @omgitsraven on GitHub (May 10, 2022). ### Windows Terminal version 1.12.10982.0 ### Windows build number 10.0.19044.0 ### Other Software _No response_ ### Steps to reproduce 1. Open Windows Terminal 2. Open a Powershell terminal 3. Press the enter key repeatedly, until the content of the window begins to scroll (so that the active prompt is at the *bottom* of the window.) 4. Type a command that wraps onto *three* lines, but do *not* hit enter. (The command doesn't have to be valid, you can just hold down the `q` key.) 5. Start *deleting* characters with the backspace key, until the command should fit onto two lines. (Go slightly *past* it fitting exactly; make some empty space on the end of the second line.) ### Expected Behavior You should see a two-line-long command after your prompt. ### Actual Behavior Once you delete enough characters to fit *exactly* on two lines, the window scrolls up for some reason... And then, once you delete one character MORE than that, the first two lines visually mash up to create a command that appears to still be three lines long! (The command actually still runs normally, it's just very confusing to edit...) Here is an example, where I filled the first line with `a`s, the second line with `b`s, and the third line with `c`s, and then deleted the third line and some of the second: Before deleting anything: ![image](https://user-images.githubusercontent.com/8540042/167512931-5b61beaf-3152-499b-840b-d3992e7473cc.png) After pressing backspace several times: ![image](https://user-images.githubusercontent.com/8540042/167512952-577281d1-d81c-4ec7-adc4-9d0ab465d432.png) Also, note that this happens in Powershell running inside Windows Terminal, but NOT when attempted in the *standalone* Powershell prompt.
claunia added the Issue-BugResolution-ExternalNeeds-Tag-Fix labels 2026-01-31 05:42:48 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17446