kovidgoyal / kovidgoyal/kitty

make `cursor_trail` work on the same command prompt only

Open
#8,147 10 comments 4 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
34.9k
Forks
1.5k
Avg merge
8h 28m
Merged PRs (30d)
43

Description

**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.

Contributor guide

Open the contributing guide

Research direction

Start by locating the cursor_trail implementation and the existing cursor_trail_start_threshold and cursor_trail_decay option handling. Define how the requested scenario should distinguish movement within one command prompt from movement caused by submitted commands or program output, then verify the behavior for those examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.