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

Terminal cursor change after quitting pacseek #19

Closed
vaygr opened this issue Sep 10, 2022 · 7 comments
Closed

Terminal cursor change after quitting pacseek #19

vaygr opened this issue Sep 10, 2022 · 7 comments

Comments

@vaygr
Copy link

vaygr commented Sep 10, 2022

So I have underline as a terminal cursor.

After quitting pacseek it's reset to block, which pacseek uses I assume.

@moson-mo
Copy link
Owner

I'm not aware that pacseek (or the library that is being used) can even change the cursor style.
Isn't that even a pure terminal-emulator setting?

Please provide more information:

  1. Terminal emulator
  2. Shell
  3. How/Where did you set up the cursor style

@vaygr
Copy link
Author

vaygr commented Sep 11, 2022

I wonder if it comes from the Go library..

  1. st 0.8.5 with the patch
  2. bash 5.1.016
  3. see the patch in 1., but it's set via ~/.Xresources with st.cursorstyle: 3 after applying this patch

@vaygr
Copy link
Author

vaygr commented Sep 11, 2022

A temporary workaround for me could be this:

$ alias pacseek='pacseek; echo -e -n "\x1b[\x33 q"'

But it would be better for pacseek to not mess up with the cursor in the first place if possible.

@moson-mo
Copy link
Owner

Yepp I can reproduce it.

Seems it's connected to this commit in the upstream library gdamore/tcell@761abf6

Only seems to happen with the InputField component of tview 🤔

Will probably take some time and involvement of the library devs to get it fixed. Need to do some more analysis on this.

Good that you have a workaround for now. 😉

@moson-mo
Copy link
Owner

Hey @vaygr

Seems there is no proper way to detect the "current style". See gdamore/tcell#559 (comment)
Setting up the default style in the terminal emulator settings should do the trick.
Now, I don't know if that is an options in st, but in xfce4-terminal doing it this way, it works fine.
If not, I'm afraid you'll have to live with the workaround.

@vaygr
Copy link
Author

vaygr commented Sep 12, 2022

I see.

Well, the above patches do just that. But my assumption is that xfce4-terminal always makes sure the cursor stays as assigned, while st does so only on init.

Thanks for investigating!

@vaygr
Copy link
Author

vaygr commented Sep 12, 2022

Yeah, I just checked: echo -e -n "\x1b[\x30 q" has no effect in xfce4-terminal when the cursor set to blinking underline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants