Skip to content

multiline input: unable to delete previous lines #22

@mcpcpc

Description

@mcpcpc

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions