Skip to content

gum choose: items under cursor, which selected shows as just selected #954

@maraloon

Description

@maraloon

Describe the bug
When get cursor on an option that selected, there are no styles for "selected under cursos", so only way to understand where are you is cursor prefix, but users may want to set cursor prefix to empty line, so there is no

To Reproduce
Steps to reproduce the behavior:

  1. set env vars:
export GUM_CHOOSE_CURSOR_BACKGROUND="#d78700"
export GUM_CHOOSE_CURSOR_FOREGROUND="#000000"
export GUM_CHOOSE_ITEM_BACKGROUND=""
export GUM_CHOOSE_ITEM_FOREGROUND=""
export GUM_CHOOSE_SELECTED_BACKGROUND=""
export GUM_CHOOSE_SELECTED_FOREGROUND=""
  1. run echo "one\ntwo\nthree" | gum choose --no-limit --header="Hooks:" --selected="$h_git,$h_qute" --selected-prefix="⬤ " --unselected-prefix="◯ " --cursor-prefix="◯ " --cursor=""

Expected behavior
There is a mix of style for "selected under cursor"

Screenshots
see demo. before - is how it shows now, after - after code fix

Additional context
I will make a PR for that

gum_select_demo.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions