Skip to content

Last character of command line gets overwritten on cancel-commandline in normal and visual vi modes #11261

@danielrainer

Description

@danielrainer

To reproduce:

  1. Start fish as fish --no-config -C 'fish --no-config --init-command='fish_vi_key_bindings; bind ctrl-c cancel-commandline; bind --mode insert ctrl-c cancel-commandline; bind --mode visual ctrl-c cancel-commandline'
  2. Enter some characters, e.g. asdf
  3. Press escape to get into normal mode.
  4. Press ctrl-c to cancel the command line. Observe that the last letter gets overwritten, turning asdf into asd^C.

The same happens when pressing ctrl-c in visual mode. In insert mode, the desired behavior (turning asdf into asdf^C happens).

Tested on b0be53e.

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionSomething that used to work, but was broken, especially between releases

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions