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

Helix changes terminal cursor style #2684

Closed
GandelXIV opened this issue Jun 6, 2022 · 3 comments · Fixed by #3289 or #8591
Closed

Helix changes terminal cursor style #2684

GandelXIV opened this issue Jun 6, 2022 · 3 comments · Fixed by #3289 or #8591
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors E-has-instructions Call for participation: Has instructions for fixing the issue and opening a PR

Comments

@GandelXIV
Copy link

Summary

After quitting helix my terminal cursor changes from Beam (my default) to Block (helix default). I had the same issue of vim but i fixed it by adding set guicursor= to my .vimrc. However, i could not find a way to do that in helix.

Reproduction Steps

  1. Open helix
  2. Exit
  3. Cursor style has changed

Helix log

No response

Platform

Linux

Terminal Emulator

Alacritty

Helix Version

helix 22.05

@GandelXIV GandelXIV added the C-bug Category: This is a bug label Jun 6, 2022
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Jun 7, 2022
@DivergentClouds
Copy link

I found the problem line.

The escape code written to the terminal to reset the cursor (\x1B[2 q ) instead sets the cursor to be a static block.

The specification defines the cursor set sequence as follows:

CSI Ps SP q
          Set cursor style (DECSCUSR), VT520.
            Ps = 0  ⇒  blinking block.
            Ps = 1  ⇒  blinking block (default).
            Ps = 2  ⇒  steady block.
            Ps = 3  ⇒  blinking underline.
            Ps = 4  ⇒  steady underline.
            Ps = 5  ⇒  blinking bar, xterm.
            Ps = 6  ⇒  steady bar, xterm.

CSI is ESC [.
SP is space.

The simplest solution is probably to get the terminfo on program start and restore it on program end. I'd submit a PR but I don't know Rust.

@the-mikedavis the-mikedavis linked a pull request Aug 1, 2022 that will close this issue
@archseer
Copy link
Member

archseer commented Aug 2, 2022

Leaving this open since we'll probably be adding terminfo soon (@sudormrfbin needs it in another PR)

@pascalkuthe
Copy link
Member

We can use termini to obtain terminfo now so implementing this should be relatively straight forward

@pascalkuthe pascalkuthe added E-good-first-issue Call for participation: Issues suitable for new contributors E-has-instructions Call for participation: Has instructions for fixing the issue and opening a PR E-easy Call for participation: Experience needed to fix: Easy / not much labels Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors E-has-instructions Call for participation: Has instructions for fixing the issue and opening a PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants