The terminal is buffering in continuous printing #16603

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

Originally created by @donno2048 on GitHub (Feb 2, 2022).

Windows Terminal version

1.11.3471.0

Windows build number

10.0.19043.1466

Other Software

No response

Steps to reproduce

// poc.c
#include <stdio.h>
#include <windows.h>
int main(void) {
    CONSOLE_SCREEN_BUFFER_INFO csbi;
    GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
    int width = csbi.srWindow.Right - csbi.srWindow.Left + 1;
    int height = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
    char f[height][width];
    memset(f, ' ', height * width);
    f[height / 2][width / 2] = '*';
    while(1) {
        puts(*f);
    }
}
>gcc poc.c -o main
>main

Expected Behavior

One "*" character is supposed to appear in the middle of the terminal

Actual Behavior

The terminal is buffering just like I previously mentioned here

Originally created by @donno2048 on GitHub (Feb 2, 2022). ### Windows Terminal version 1.11.3471.0 ### Windows build number 10.0.19043.1466 ### Other Software _No response_ ### Steps to reproduce ```c // poc.c #include <stdio.h> #include <windows.h> int main(void) { CONSOLE_SCREEN_BUFFER_INFO csbi; GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); int width = csbi.srWindow.Right - csbi.srWindow.Left + 1; int height = csbi.srWindow.Bottom - csbi.srWindow.Top + 1; char f[height][width]; memset(f, ' ', height * width); f[height / 2][width / 2] = '*'; while(1) { puts(*f); } } ``` ```bat >gcc poc.c -o main >main ``` ### Expected Behavior One "*" character is supposed to appear in the middle of the terminal ### Actual Behavior The terminal is buffering just like I previously mentioned [here](https://github.com/microsoft/vscode/issues/142001)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16603