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

make cursor_trail work on the same command prompt only #8147

Open
xuhdev opened this issue Dec 21, 2024 · 2 comments
Open

make cursor_trail work on the same command prompt only #8147

xuhdev opened this issue Dec 21, 2024 · 2 comments

Comments

@xuhdev
Copy link

xuhdev commented Dec 21, 2024

Is your feature request related to a problem? Please describe.

Currently cursor_trail always shows cursor movement once the distance is beyond a certain threshold.

However, in most cases when the cursor makes a big movement, my eyes either know where
it will land or don't care. For example,

  • After typing in a long command and pressing "Enter", I know it will show up in the next command line prompt.
  • When a program outputs long segments of text, I don't care where the cursor is.

However, the unnecessary animation in these scenarios is distractive.

The moments I see cursor_trail is only needed when I move cursor within a prompt
buffer. For example, I may press Alt-F to jump a word, and the word has an
unknown length to my eyes until I look carefully.

I tried to adjust cursor_trail_start_threshold and cursor_trail_decay, but
they don't seem to be able to address the problem.

Describe the solution you'd like
Add a new option cursor_trail_scenario to specify when to enable cursor
movement.

@wwqwq2313
Copy link

Hello, we tried to solve the issue.

This is what we did:

Added a new cursor_trail_scenario option to control when the cursor trail is shown. Updated the cursor trail logic to check this option before rendering.

You can review changes in this commit: wwqwq2313@3f6821e.

Caution

Disclaimer: The concept of solution was created by AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.


Latta AI seeks to solve problems in open source projects as part of its mission to support developers around the world. Learn more about our mission at https://latta.ai/ourmission . If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.

@kovidgoyal
Copy link
Owner

@jinhwanlazy please review.

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

No branches or pull requests

3 participants