-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Cursor moves to commandline when searching for pattern (perceived as cursor flicker) #25980
Comments
PS: The reason that I created this as a separate issue from #25974 is because the cursor moves to the commandline for a different reason: in that issue it's because a message is being printed, whereas in this issue it appears to be because neovim is "resting" or "parking" the cursor in the commandline until it finds the next match. |
The downstream issue in neovide: neovide/neovide#1665 |
This seems intentional. There is even an explicit cursor move to cmdline: Line 1271 in fdaf6bc
|
If there's no good reason for the explicit cursor move, I would favor removing it. It does cause an erratic/jittery user experience, especially with an animated cursor as shown in the screen capture above, and in the downstream issue in neovide. I'm not familiar with C or the code-base at all, but I imagine that the reasoning for moving the cursor to the command line was to put it in a temporary "holding area" until the next match was found. A better UX would be to just leave the cursor exactly where it is. Then when it is finally moved to the next match, the transition/animation is natural. |
This is a feature, it's how vim indicates "busy" state. However, the code that @zeertzjq mentioned can be improved, it should call The call to |
Why is that?
It would be great it if a UI could opt to continue showing the cursor during "busy" but leave it where it is for the sake of natural-looking cursor animations. |
This is to let the user know that processing is taking place. |
Problem
The cursor briefly moves to the commandline when searching for the next pattern using:
n
N
*
#
In terminal nvim
In terminal nvim, this is perceived as a cursor flicker.
Screen.Recording.2023-11-10.at.8.25.30.PM.mov
In neovide (with cursor animation)
In neovide with cursor animation enabled, this is perceived as the cursor jumping across the screen and then back.
Screen.Recording.2023-11-10.at.8.29.27.PM.mov
Steps to reproduce
Open neovim:
or
Create new buffer in right window
Setup buffer to contain
xyz
on 10,000,000 lines andabc
on line 1 and line 5,000,000Invoke search on
abc
:Notice that cursor goes to commandline between searches.
Expected behavior
The cursor should not move to the commandline.
It should stay in the same screen position until the next search match location is found and then move there directly.
Neovim version (nvim -v)
NVIM v0.10.0-dev-1461+g468292dcb-Homebrew
Vim (not Nvim) behaves the same?
yes, vim 9.0.1544 (cursor disappears briefly as well but does not seem to appear in comandline)
Operating system/version
macOS 13.5.1
Terminal name/version
kitty 0.29.0
$TERM environment variable
xterm-kitty
Installation
homebrew
The text was updated successfully, but these errors were encountered: