#5401·kakoune

[BUG] `gd` and `gu` do not interact correctly with counts

Author: silversquirlCreated Oct 15, 2025Updated Sep 16, 2026
Labelsbug

Version of Kakoune

git

Reproducer

  1. make a buffer with a few empty lines: 3o<esc>,
  2. use gd with a count: 2gd

Outcome

the key sequence is parsed as 2g, d, which goes to line 2 and deletes one char, rather than going up two visual lines as desired

Expectations

counts should work with the visual line movement keys, which will probably require them to be moved out of the goto mode. i'd suggest maybe putting them in the visual mode instead, as vd and vu? they're not a perfect fit there, but i can't think of anywhere better for them to go.

Additional information

i'm currently using the following workaround in my mappings: :exec %{:reg @ gd<lt>ret<gt>} %val{count} q<ret>