pwsh setting console BufferWidth causes terminal to mess up #23967

Open
opened 2026-01-31 08:57:37 +00:00 by claunia · 0 comments
Owner

Originally created by @FlukeFan on GitHub (Jan 16, 2026).

Windows Terminal version

1.23.13503.0

Windows build number

10.0.22631.0

Other Software

pwsh or powershell.exe

Steps to reproduce

Open pwsh/powershell in WT. Execute the following:

$tempVar = 'M' * 2000
[Console]::BufferWidth = 4096
$tempVar

... then type "My cursor is here", and see that the position of the prompt and the cursor are no longer alligned:

Image

Expected Behavior

I expect the terminal to handle the mutation of the BufferSize without messing up the terminal's output.

Actual Behavior

The terminal loses the position of the cursor.

Originally created by @FlukeFan on GitHub (Jan 16, 2026). ### Windows Terminal version 1.23.13503.0 ### Windows build number 10.0.22631.0 ### Other Software pwsh or powershell.exe ### Steps to reproduce Open pwsh/powershell in WT. Execute the following: ``` $tempVar = 'M' * 2000 [Console]::BufferWidth = 4096 $tempVar ``` ... then type "My cursor is here", and see that the position of the prompt and the cursor are no longer alligned: <img width="1467" height="320" alt="Image" src="https://github.com/user-attachments/assets/865c82f1-e56c-45df-b2b9-2ef544810e9f" /> ### Expected Behavior I expect the terminal to handle the mutation of the BufferSize without messing up the terminal's output. ### Actual Behavior The terminal loses the position of the cursor.
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 08:57:37 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23967