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

Gracefully exit application #15

Open
jerrytingley opened this issue Oct 31, 2020 · 7 comments
Open

Gracefully exit application #15

jerrytingley opened this issue Oct 31, 2020 · 7 comments
Labels
bug Something isn't working question Further information is requested

Comments

@jerrytingley
Copy link

Screenshot_20201031_133225
I've noticed a general issue with ncurses applications where they do not always exist gracefully. Once you Ctrl-C from the applciation, typing into the shell shows nothing and pressing enter shifts the prompt to the right. Usually requires one to just close that terminal and open another one. Is there a way for globe to exit curses in a way as to return the terminal to its original state?

@adamsky
Copy link
Owner

adamsky commented Oct 31, 2020

Hey! Not sure what you mean there. This project doesn't use ncurses, it uses crossterm instead. In terms of graceful exit, it's hard to tell what's the issue there. For most people it works just fine from what I've heard.

Could you share some information about your system? Perhaps the terminal you're running doesn't play nicely with crossterm or something.

@jamesblau
Copy link

Same problem here: Ubuntu 20.04.1 LTS, with kitty terminal (TERM=xterm-kitty), gnome-terminal (TERM=xterm-256color), and sucklesss simple terminal (TERM=st-256color).

@adamsky
Copy link
Owner

adamsky commented Oct 31, 2020

Does Ctrl-C end up producing the same result as exiting by pressing any character key?

@jamesblau
Copy link

jamesblau commented Oct 31, 2020

Yep, same result.

Cargo 1.44.1, rustup 1.22.0 if that matters.

Same result in kitty terminal (TERM=xterm-kitty), gnome-terminal (TERM=xterm-256color), and suckless simple terminal (TERM=st-256color), assuming I'm using pan-up-panic branch (only one that works for me).

@adamsky adamsky added the bug Something isn't working label Oct 31, 2020
@adamsky
Copy link
Owner

adamsky commented Nov 1, 2020

I'm unable to replicate on any of my machines, tried different terminals and older rust versions.

@jerrytingley
Copy link
Author

Whoops should have checked if it was using curses before posting, I've had this issue when I worked on a curses application. I remember having to write some code to exit the application such that the the prior state of the terminal was set on quit and thought something conceptually similar was needed here, but not sure how that all works in crossterm.

For reference I'm on Ubuntu LTS 20.04.01 and tested with gnome-terminal/bash with TERM=xterm-256color. Interesting that @jamesblau and I have the nearly identical configurations and are having the same issue, just not sure what common denominator would be the most likely culprit.

@adamsky adamsky added the question Further information is requested label Nov 3, 2020
@evan-chaney
Copy link

I checked with kitty and gnome-terminal on Fedora 33. Tried xterm-256color, xterm and screen-256color and could not replicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants