Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiline input: unable to delete previous lines #22

Open
mcpcpc opened this issue Oct 1, 2020 · 6 comments
Open

multiline input: unable to delete previous lines #22

mcpcpc opened this issue Oct 1, 2020 · 6 comments
Labels
bug Something isn't working depends-on-vte

Comments

@mcpcpc
Copy link

mcpcpc commented Oct 1, 2020

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;
}
@andir
Copy link
Owner

andir commented Oct 1, 2020

Yeah, I can confirm that this is happening. In this case It is probably worth testing with gnome-terminal and/or reporting the issue to with libvte as that is basically all I'm using here.

@mcpcpc
Copy link
Author

mcpcpc commented Oct 1, 2020

submitted upstream to libvte: https://gitlab.gnome.org/GNOME/vte/-/issues/287

@andir
Copy link
Owner

andir commented Oct 1, 2020

This could also be somewhat related to the issue: https://gitlab.gnome.org/GNOME/vte/-/issues/62

@andir andir added bug Something isn't working depends-on-vte labels Oct 1, 2020
@mcpcpc
Copy link
Author

mcpcpc commented Oct 1, 2020

submitted upstream to libvte: https://gitlab.gnome.org/GNOME/vte/-/issues/287

ahh yes! somehow missed this one =S. Item 2 is identical to the issue. also, i can confirm that the behavior is “fine” with using a terminal multiplexer, such as screen.

seems that the best solution, until corrected upstream is to use urxvt, screen or tmux.

@andir
Copy link
Owner

andir commented Oct 1, 2020 via email

@mcpcpc
Copy link
Author

mcpcpc commented Oct 1, 2020

Here's another relevant conversation I am having with the developer of the foot terminal emulator: link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working depends-on-vte
Projects
None yet
Development

No branches or pull requests

2 participants