Cursor style changed after exit
Description
Similar to #364, the cursor style changes from blinking block in my theme colour to a still blinking but now pink vertical bar.
Setup:
- crush v0.13.0-beta.1 (installed via
aptas per README instructions) - Linux Tuxedo OS 24.04
- Bash shell v5.2.21
- urxvt terminal emulator v9.31
- tmux v3.4
To reproduce:
Launch and exit crush
Expected behavior:
Cursor is restored back to original style.
Version
0.13.0-beta.1
Environment
Linux Tuxedo OS / urxvt / tmux
Hey @philippm, thank you for filing this one. This is happening because URxvt doesn't support the sequences used to reset the cursor color and bg. I've submitted a patch to fix this. You can apply it to your build. https://github.com/exg/rxvt-unicode/pull/6 https://github.com/exg/rxvt-unicode/pull/6.patch
@aymanbagabas does that mean we have nothing to do here at Crush?
@LarsArtmann Not really, perhaps we can change how Bubble Tea works, but that's going to affect all BT applications. Do you use URxvt on a daily basis?
I use Iterm2 on MacOS 15, so I don't think so. I would wait for the upstream issue to be resolved and than close this issue, as soon as they get merged.
Thanks for looking into this issue, much appreciated!
@aymanbagabas I am also experiencing this issue on macOS/iTerm2 with tmux, but it extends beyond the cursor (for example my stty settings will sometimes change on exit). Although the recent fix helped for the cursor, it is still incomplete - for example I still often lose the cursor if I abort during model selection.
I have a local patch that uses term.GetState and term.Restore alongside the ansi reset commands. If you like I can test and PR that solution from my fork for consideration. At least for me, having this small detail work correctly every time has been critical in my willingness to use this otherwise outstanding tool.
@aymanbagabas I am also experiencing this issue on macOS/iTerm2 with tmux, but it extends beyond the cursor (for example my stty settings will sometimes change on exit). Although the recent fix helped for the cursor, it is still incomplete - for example I still often lose the cursor if I abort during model selection.
Hi @millerjason, what macOS/iTerm2/Tmux version are you running? I'm trying to reproduce here with no luck. Could you give me a step by step way to reproduce this issue on iTerm2 and Tmux?
I have a local patch that uses
term.GetStateandterm.Restorealongside theansireset commands. If you like I can test and PR that solution from my fork for consideration. At least for me, having this small detail work correctly every time has been critical in my willingness to use this otherwise outstanding tool.
Crush handles all that via Bubble Tea. When you exit Crush, everything should be restored to normal. That includes stty settings, cursor, and background colors, etc. OP has an issue with the cursor because URxvt doesn't support the cursor color reset escape sequences that everyone else supports.