Skip to content

Fix terminal cursor shape reset - #3289

Merged
archseer merged 1 commit into
helix-editor:masterfrom
ericpko:terminal-cursor-style-restore
Aug 2, 2022
Merged

Fix terminal cursor shape reset#3289
archseer merged 1 commit into
helix-editor:masterfrom
ericpko:terminal-cursor-style-restore

Conversation

@ericpko

@ericpko ericpko commented Aug 1, 2022

Copy link
Copy Markdown
Contributor

I changed this line by changing the 2 to a 0.

The previous escape code \x1B[2 q sets the cursor to be a static block according to this specification. The new escape code \x1B[0 q restores the cursor to the user's default.

To be honest, I'm not sure if this will fix the issue for everyone. It fixes it for me on arch linux using gnome and with the alacritty terminal. With this change, when I exit out of helix, my terminal cursor is restored to a blinking underscore.

@DivergentClouds found the solution, which they shared in issue #2684.

There are also several other terminal-based editors that have had this same issue of not restoring the user's terminal cursor style, such as here and here.

…1B[0 q' to restore cursor to user default after exiting helix
@the-mikedavis the-mikedavis changed the title Fixed issue: Helix changes terminal cursor style #2684 Fix terminal cursor shape reset Aug 1, 2022
@the-mikedavis the-mikedavis linked an issue Aug 1, 2022 that may be closed by this pull request
@archseer

archseer commented Aug 2, 2022

Copy link
Copy Markdown
Member

This is probably a better default to reset back to, but we do want a better solution in the future that reads terminfo at startup. I'll merge this for now and we'll fix it more properly once terminfo is added

@archseer
archseer merged commit d693b37 into helix-editor:master Aug 2, 2022
@ericpko
ericpko deleted the terminal-cursor-style-restore branch August 2, 2022 01:17
GreasySlug pushed a commit to GreasySlug/helix that referenced this pull request Aug 2, 2022
…1B[0 q' to restore cursor to user default after exiting helix (helix-editor#3289)
@DivergentClouds

Copy link
Copy Markdown

Just want to give you a heads up that I use they/them and not he/him, it'd mean a lot if you edited your message accordingly, thank you

thomasskk pushed a commit to thomasskk/helix that referenced this pull request Sep 9, 2022
…1B[0 q' to restore cursor to user default after exiting helix (helix-editor#3289)
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

Successfully merging this pull request may close these issues.

Helix changes terminal cursor style

3 participants