crush icon indicating copy to clipboard operation
crush copied to clipboard

Cursor style changed after exit

Open philippm opened this issue 2 months ago • 7 comments

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 apt as 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

philippm avatar Oct 24 '25 18:10 philippm

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 avatar Nov 17 '25 15:11 aymanbagabas

@aymanbagabas does that mean we have nothing to do here at Crush?

LarsArtmann avatar Nov 17 '25 19:11 LarsArtmann

@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?

aymanbagabas avatar Nov 17 '25 19:11 aymanbagabas

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.

LarsArtmann avatar Nov 17 '25 22:11 LarsArtmann

Thanks for looking into this issue, much appreciated!

philippm avatar Nov 22 '25 20:11 philippm

@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.

millerjason avatar Nov 26 '25 05:11 millerjason

@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.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.

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.

aymanbagabas avatar Nov 26 '25 14:11 aymanbagabas