multibar icon indicating copy to clipboard operation
multibar copied to clipboard

Strange behaviour on exit

Open michaelmior opened this issue 10 years ago • 5 comments

After exiting a program using multibar, I get ;1R entered into my shell prompt and some control characters (e.g. Control+C) stop working until I reset my terminal. Not sure what's going on here.

michaelmior avatar Jun 25 '15 14:06 michaelmior

I have the same issue. In general, ctrl+c does not work consistently. I either get weird characters, repeated prints of strings, or just plain freezing.

jamra avatar Jan 26 '17 17:01 jamra

Hmm. I thought that had been fixed. Sorry to hear about the issues! I'm not sure when I will get a chance to dig in (PRs welcome!) as I'm swamped right now. I can maybe get to it this weekend; no guarantees. Originally, the issue was the underlying terminal implementation could exit and leave mess up "raw" vs "cooked" mode. A terrible workaround, you can try typing stty -raw (you wont see it) to reclaim your terminal.

On Thu, Jan 26, 2017 at 9:16 AM Jacob Amrany [email protected] wrote:

I have the same issue. In general, ctrl+c does not work consistently. I either get weird characters, repeated prints of strings, or just plain freezing.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sethgrid/multibar/issues/7#issuecomment-275449277, or mute the thread https://github.com/notifications/unsubscribe-auth/AA8afBb24BlG1uDzWvAhcLFXnf5RbR4Pks5rWNTogaJpZM4FLzxD .

sethgrid avatar Jan 27 '17 01:01 sethgrid

Unfortunately I'm not currently using multibar and I won't have the time to look at this in the near future. Thanks for the response though! If I do have a chance to get back to this, I will update.

michaelmior avatar Jan 27 '17 18:01 michaelmior

Same issue here. I think you can also restore the terminal using the following command after app exits:

stty sane

After reading the code, I am a little bit confused by how multibar interacts with curse and curse interacts with terminal. E.g. Multibar will create a new Cursor instance whenever it needs to do something, and I think curse is doing something similar. And I don't see Restore/Close called on application exit.

IMHO there should be only one Cursor+Term instance per application, and we properly restore the terminal after application exits.

infgeoax avatar Mar 27 '17 00:03 infgeoax

Same issue here

daniel-hutao avatar Aug 12 '19 11:08 daniel-hutao