Skip to content

cc/S in the prompt (vim mode) leaves a stray prompt icon that must be backspaced #614

@KorigamiK

Description

@KorigamiK

Description

With prompt_vim_mode = true, clearing the query from normal mode with cc (or S) leaves a stray copy of the prompt icon (e.g. 🪿) in the input bar that has to be manually backspaced out.

Steps to reproduce

  1. Set prompt_vim_mode = true.
  2. Open the picker and type a query.
  3. Press <Esc> to enter normal mode, then cc (or S).

Expected: the query is cleared and the prompt icon remains as the prefix.
Actual: the line is fully cleared and a literal prompt icon is left behind that must be backspaced.

Root cause

The input bar is a buftype=prompt buffer with the prompt set via prompt_setprompt (lua/fff/picker_ui/ui_creator.lua). The prompt icon is protected prompt text at the start of the line. cc/S delete the entire line including the prompt, and the prompt buffer then re-inserts the icon as plain literal text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions