Skip to content

Add an option not to update caret indicator while caret is still moving #18

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

Open
eugenesvk opened this issue Apr 5, 2025 · 1 comment

Comments

@eugenesvk
Copy link

Due to polling delay, the caret indicator is "continuously jumpy", but since you can't type while moving the caret, this is just visual noise

CaretDelayNo.mp4

I think a configurable option could be to not update the indicator until the caret has stopped moving

CaretDelayYes.mp4

Maybe a rudimentary "is any cursor key down" check could work?

  is_cursor_key_down  	:= (GetKeyState("Left"))
    ||                	   (GetKeyState("Right"))
    ||                	   (GetKeyState("Up"))
    ||                	   (GetKeyState("Down"))

(maybe add pagedown/up? Though in the general case you can't detect all cursor moving keys and will also fail on non-key cursor movements)

Or maybe a better option would be to record time since last caret position change and allow user to set the threshold of what counts as "caret stopped moving"

@yakunins
Copy link
Owner

yakunins commented Jun 1, 2025

Prob it is better to update caret pos on every keypress, so it will stick closely...

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