Skip to content

Pressing backspace on an empty input closes it #1681

@Tyarel8

Description

@Tyarel8

What system are you running Yazi on?

Windows

What terminal are you running Yazi in?

wezterm 20240812-215703-30345b36

yazi --debug output

Yazi
    Version: 0.3.3 (631afd0 2024-09-25)
    Debug  : false
    OS     : windows-x86_64 (windows)

Ya
    Version: 0.3.3 (631afd0 2024-09-25)

Emulator
    Emulator.via_env: ("xterm-256color", "WezTerm")
    Emulator.via_csi: Ok(Unknown([]))
    Emulator.detect : WezTerm

Adapter
    Adapter.matches: Iip

Desktop
    XDG_SESSION_TYPE           : None
    WAYLAND_DISPLAY            : None
    DISPLAY                    : None
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL              : Some("nu")
    EDITOR             : Some("hx")
    VISUAL             : None
    YAZI_FILE_ONE      : Some("C:\\Users\\<user>\\scoop\\apps\\git\\2.46.2\\usr\\bin\\file.exe")
    YAZI_CONFIG_HOME   : Some("C:\\Users\\<user>\\Sync\\config\\yazi")

Text Opener
    default: Some(Opener { run: "hx %*", block: true, orphan: false, desc: "helix", for_: None, spread: true })
    block  : Some(Opener { run: "hx %*", block: true, orphan: false, desc: "helix", for_: None, spread: true })

Multiplexers
    TMUX               : false
    tmux version       : program not found
    ZELLIJ_SESSION_NAME: None
    Zellij version     : program not found

Dependencies
    file             : 5.45
    ueberzugpp       : program not found
    ffmpegthumbnailer: program not found
    magick           : 7.1.1-38
    fzf              : 0.55.0
    fd               : 10.2.0
    rg               : 14.1.1
    chafa            : program not found
    zoxide           : 0.9.6
    7z               : 24.08
    7zz              : program not found
    jq               : 1.7.1

Did you try the latest nightly build to see if the problem got fixed?

Yes, and I updated the debug information above (yazi --debug) to the nightly that I tried

Describe the bug

When writing to an input, like renaming the file under the cursor, if the input is empty and you press backspace it closes the dialog. This happens on all input dialogs like shell or create, but it really only bothers me when renaming since if I keep the key pressed to delete the previous filename it closes the dialog if I'm not careful.

Minimal reproducer

Enter yazi, press r to rename the file/folder under the cursor, press backspace repeatedly.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions