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

Blinking cursor should always reset to visible on movement #83

Closed
jsgf opened this issue Dec 27, 2019 · 4 comments · Fixed by #90
Closed

Blinking cursor should always reset to visible on movement #83

jsgf opened this issue Dec 27, 2019 · 4 comments · Fixed by #90

Comments

@jsgf
Copy link
Contributor

jsgf commented Dec 27, 2019

Please include as much information as possible that can help to reproduce and understand the issue;
some pointers and suggestions are included here in this template. You are empowered to include
more or less information than is asked for here!

Did something not work the way you expected?

When settings a blinking cursor mode, the cursor should always be visible after moving. The blinking is only relevant while it sits in one place in the window.

What did you try?

Set default_cursor_style = "BlinkingUnderline"

What did you expect to happen?

Cursor blinking while idle, but visible while typing.

What actually happened?

Cursor blinking is independent of motion, and so is often invisible while typing.

@jsgf
Copy link
Contributor Author

jsgf commented Dec 28, 2019

I'm having a go at fixing this.

jsgf added a commit to jsgf/wezterm that referenced this issue Dec 28, 2019
@wez
Copy link
Owner

wez commented Dec 28, 2019

Thanks; I'm unbricking something unrelated to this atm!
I had envisioned adding a little state struct that tracked whether it is on or off and the time of the last transition, with a keypress event resetting it to On(now). That could allow for controlling the duration of On and Off separately.

jsgf added a commit to jsgf/wezterm that referenced this issue Dec 28, 2019
Not really sure about this. Last-moved time is purely a presentation
matter, whereas cursor position is a more fundimental model thing,
so I'm not sure if they should go together.

wez#83
jsgf added a commit to jsgf/wezterm that referenced this issue Dec 28, 2019
The cursor should only start blinking when its been sitting in once place;
a moving cursor should always be visible. Rather than making the cursor blink
relative to the creation time of the window, track its position, and use the
last time it moved as the blinking timebase.

Fixes wez#83
@jsgf
Copy link
Contributor Author

jsgf commented Dec 28, 2019

I made it purely a function of its position, rather than tying it to keypresses.

@wez wez closed this as completed in #90 Dec 29, 2019
wez pushed a commit that referenced this issue Dec 29, 2019
The cursor should only start blinking when its been sitting in once place;
a moving cursor should always be visible. Rather than making the cursor blink
relative to the creation time of the window, track its position, and use the
last time it moved as the blinking timebase.

Fixes #83
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants