Skip to content

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

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.

Activity

  1. gustav-fff commented on Jun 18, 2026

    @gustav-fff
    Collaborator

    [triage-bot] LINKED PR: #615 (open) — #615

    Maps cc and S in prompt_vim_mode to reset the line to just the prompt and re-enter insert at the correct column, so the protected prompt icon is no longer re-inserted as literal text. Empty-query search runs as normal after clearing.

    Honk-Honk 🪿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions