whisk.nvim icon indicating copy to clipboard operation
whisk.nvim copied to clipboard

Issues with hjkl motions

Open Cyanelm opened this issue 9 months ago • 5 comments

When I want to move down a lot of line, I can't press 'j' continuously, it only moves me of one line. Is there a way to deactivate the animation only on hjkl?

Cyanelm avatar Feb 13 '26 15:02 Cyanelm

Could you elaborate a bit more on your setup? I am unable to reproduce any movement issue with rapid hjkl movements on a line by line basis or multi line.

josstei avatar Feb 18 '26 05:02 josstei

My package manager is Lazy, I'm on arch, nvim v0.11.6. Maybe I didn't expresse myself correctly but it is not with rapid hjkl movement, it is when I press continously on "j" for example, it only move one line. Without the cursor animation it move down lines until I release the key. What other information would you need? (maybe a video etc...?)

Cyanelm avatar Feb 18 '26 10:02 Cyanelm

I'm not able to reproduce this on so far. Could you provide your configuration of the plugin as well ? So far if j is held down it will continually go down until released as expected

josstei avatar Feb 18 '26 12:02 josstei

Root Cause

On Linux, key repeat events fire rapidly. Each repeated keypress triggered a new animation, but the orchestrator was discarding the in-flight animation (stop_all) without snapping the cursor to its final position first.

Since the next animation calculated its starting position from the current cursor — which never moved because the previous animation was thrown away before completing — the cursor appeared frozen.

The faster the key repeat rate (common on Linux, especially Arch setups with aggressive xset r rate settings), the worse the effect, since animations had even less time to make progress before being discarded.

Fix

Replaced the destructive stop_all() with complete_all() in the orchestrator's domination path. Now when a new keypress interrupts an in-flight animation, the animation is instantly snapped to its final position before the next one begins.

This ensures each subsequent motion calculates from the correct starting position, allowing the cursor to move continuously as expected during key repeat.

josstei avatar Feb 19 '26 03:02 josstei

Thanks a lot it is perfect now

Cyanelm avatar Feb 19 '26 17:02 Cyanelm