New console screen buffer contains scroll from main buffer #22051

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

Originally created by @2trvl on GitHub (Aug 6, 2024).

Windows Terminal version

1.20.11781.0

Windows build number

10.0.19045.4651

Other Software

hAlternateConsoleOutput = create_console_screen_buffer(
    GENERIC_READ | GENERIC_WRITE,
    FILE_SHARE_READ | FILE_SHARE_WRITE,
    CONSOLE_TEXTMODE_BUFFER
)

Steps to reproduce

Enter commands in the main buffer until scrolling appears. Create a new console screen buffer.

Expected Behavior

Empty console screen without scrollback

image

Actual Behavior

Scroll up to the top and see the commands you entered in the main buffer.

image

In some cases, the last command also goes to a new screen buffer.

image

Originally created by @2trvl on GitHub (Aug 6, 2024). ### Windows Terminal version 1.20.11781.0 ### Windows build number 10.0.19045.4651 ### Other Software ```python hAlternateConsoleOutput = create_console_screen_buffer( GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, CONSOLE_TEXTMODE_BUFFER ) ``` ### Steps to reproduce Enter commands in the main buffer until scrolling appears. Create a new console screen buffer. ### Expected Behavior Empty console screen without scrollback ![image](https://github.com/user-attachments/assets/502cf174-5e7e-4d4c-bce9-29c5f86700e9) ### Actual Behavior Scroll up to the top and see the commands you entered in the main buffer. ![image](https://github.com/user-attachments/assets/e2ea8ea6-ae0a-4af8-a3c9-e03bc0a0fa28) In some cases, the last command also goes to a new screen buffer. ![image](https://github.com/user-attachments/assets/0b1c9ea4-c478-44b8-936d-a9348e72bfb7)
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 08:02:07 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22051