Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Feature - toggle-pane.yazi] Toggle to previous preview state when max-preview is executed #94

@Jaehaks

Description

@Jaehaks

yazi --debug output

Yazi
    Version: 25.3.2 (46125ed 2025-03-02)
    Debug  : false
    Triple : x86_64-pc-windows-msvc (windows-x86_64)
    Rustc  : 1.85.0 (4d91de4e 2025-02-17)

Ya
    Version: 25.3.2 (46125ed 2025-03-02)

Emulator
    TERM                : None
    TERM_PROGRAM        : None
    TERM_PROGRAM_VERSION: None
    Brand.from_env      : Some(Microsoft)
    Emulator.detect     : Emulator { kind: Left(Microsoft), light: false, cell_size: Some((10, 20)) }

Adapter
    Adapter.matches: Sixel

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           : None
    EDITOR          : None
    VISUAL          : None
    YAZI_FILE_ONE   : Some("C:\\Program Files\\Git\\usr\\bin\\file.exe")
    YAZI_CONFIG_HOME: Some("C:\\Users\\USER\\.config\\Dotfiles\\yazi")
    YAZI_ZOXIDE_OPTS: None
    FZF_DEFAULT_OPTS: Some("--layout=reverse --border --color=hl:#FF0000,hl+:#00FF00 --preview=\"bat --color=always {}\" --preview-window \"down,50%,hidden\" --bind=ctrl-j:up,ctrl-k:down,ctrl-d:half-page-down,ctrl-u:half-page-up,ctrl-l:forward-char,ctrl-h:backward-char,ctrl-a:beginning-of-line,ctrl-e:end-of-line,ctrl-i:toggle-preview,alt-k:preview-half-page-down,alt-j:preview-half-page-up")

Text Opener
    default     : Some(Opener { run: "nvim %*", block: true, orphan: false, desc: "nvim", for_: None, spread: true })
    block-create: Some(Opener { run: "nvim %*", block: true, orphan: false, desc: "nvim", for_: None, spread: true })
    block-rename: Some(Opener { run: "nvim %*", block: true, orphan: false, desc: "nvim", for_: None, spread: true })

Multiplexers
    TMUX               : false
    tmux version       : program not found
    tmux build flags   : enable-sixel=Unknown
    ZELLIJ_SESSION_NAME: None
    Zellij version     : program not found

Dependencies
    file          : 5.45
    ueberzugpp    : program not found
    ffmpeg/ffprobe: program not found / program not found
    pdftoppm      : 24.08.0
    magick        : 7.1.1-44
    fzf           : 0.60.3
    fd/fdfind     : 10.2.0 / program not found
    rg            : 14.1.1
    chafa         : program not found
    zoxide        : 0.9.7
    7zz/7z        : program not found / 24.09
    jq            : 1.7.1

Clipboard
    wl-copy/paste: program not found / program not found
    xclip        : program not found
    xsel         : program not found


See https://yazi-rs.github.io/docs/plugins/overview#debugging on how to enable logging or debug runtime errors.

Please describe the problem you're trying to solve

I used hide-preview.yazi and max-preview.yazi separately before and these can do what i want.

Using toggle-pane min-preview, preview can be hide when yazi starts.
But After I push i to executes toggle-pane max-preview and push again i to close it,
The preview is remain with reset state that is set in yazi.toml.

Would you be willing to contribute this feature?

  • Yes, I'll give it a shot

Describe the solution you'd like

I hope to the preview is toggled with hidden state when I execute toggle-pane max-preview again.

Additional context

No response

Checklist

  • I have searched the existing issues/discussions

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions