-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
Description
This behavior was first reported as part of mcpcpc/kirc#39 and appears to impact multiple terminal emulators (e.g. foot and st) while behaving fine in others (e.g. xterm)
To reproduce, one simply needs to read input from stdin (e.g. fgets) and type more characters than the width of the terminal window. the text that is longer than window width is then printed as a new line, making the previous line uneditable.
A simple verifiable example (written in C) includes the following:
#include <stdio.h>
#include <stdlib.h>
int
main() {
char a[1000];
fgets(a, 1000, stdin);
printf("string: %s\n", a);
return 0;
}