8000 [vi-mode] bug: cursor gets misplaced after delete · Issue #10394 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

[vi-mode] bug: cursor gets misplaced after delete #10394

@johnpyp

Description

@johnpyp

Fish: version 3.7.1-1593-g5b324f8ec (Notably includes: d51f669, addressing cursor placement issues)
OS: Arch Linux
Term: Kitty

cd ~/Random
# press: `esc v b d` to delete `Random`
cd ~/[CURSOR] # this is incorrect, cursor should be on the slash
# press: `a` to attempt to enter insert mode after the current cursor
cd ~/b # example of b is the first character of the insert

This example uses visual mode d to delete some words, moving the cursor backwards, then a to try to move into insert mode, which causes two issues:

  1. The cursor is misplaced (should be at the slash, in accordance with real vim)
  2. The first character of completion gets inserted incorrectly.

I believe the actual issue here is the placement of the cursor the wrong place after the delete, similar to other issues d51f669 has fixed. Because of this, the a is considered used to take the autocomplete character.

If you move the cursor back to the slash correctly first, then press a, this behavior doesn't occur - but I'm not sure if just doing so would fully fix the issue, because moving the cursor like that also removes the autocomplete suggestion.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0