Skip to content

Shift backward and forward cause flickering when an item in a Backstack is not valid anymore (deleted/renamed) #4292

Description

@TheVimDev

What system are you running Yazi on?

Linux Wayland

What terminal are you running Yazi in?

rioterm 0.5.26

ya env output

Yazi
    Version: 26.8.15 (1f3588d6 2026-08-16)
    Debug  : false
    Triple : x86_64-unknown-linux-gnu (linux-x86_64)
    Rustc  : 1.97.1 (8bab26f4 2026-07-14)
    Backtrace: None

Ya
    Version: 26.5.6 (c10aaa82 2026-08-26)
    Debug  : true
    Triple : x86_64-unknown-linux-gnu (linux-x86_64)
    Rustc  : 1.97.1 (8bab26f4 2026-07-14)

Config
    Init             : /home/privacy/.config/yazi/init.lua (No such file or directory (os error 2))
    Yazi             : /home/privacy/.config/yazi/yazi.toml (No such file or directory (os error 2))
    Keymap           : /home/privacy/.config/yazi/keymap.toml (No such file or directory (os error 2))
    Theme            : /home/privacy/.config/yazi/theme.toml (No such file or directory (os error 2))
    VFS              : /home/privacy/.config/yazi/vfs.toml (No such file or directory (os error 2))
    Package          : /home/privacy/.config/yazi/package.toml (No such file or directory (os error 2))
    Dark/light flavor: ArcSwapAny("") / ArcSwapAny("")

Emulator
    TERM                : Some("rio")
    TERM_PROGRAM        : Some("rio")
    TERM_PROGRAM_VERSION: Some("0.5.26")
    Brand.from_env      : Some(Rio)
    Emulator.probe      : Emulator { brand: Rio, version: "Rio 0.5.26", kgp: false, sixel: true, background: Some([0, 0, 0]), color_scheme: None, csi_16t: (11, 24), force_16t: false, cursor_blink: false, cursor_shape: None, mux: None }

Adapter
    Drivers.matches: Kgp
    TERM.dimension : Dimension { cols: 173, rows: 43, width: 1912, height: 1034 }

Desktop
    XDG_SESSION_TYPE           : Some("wayland")
    WAYLAND_DISPLAY            : Some("wayland-1")
    DISPLAY                    : Some(":0")
    NIRI_SOCKET                : None
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: Some("efb50993780079460b0cbed1363e2166a2de1d9f_1787740280_1108515064")
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL              : Some("/bin/zsh")
    EDITOR             : Some("nvim")
    VISUAL             : None
    YAZI_FILE_ONE      : None
    YAZI_CONFIG_HOME   : None
    YAZI_ZOXIDE_OPTS   : None
    SSH_AUTH_SOCK      : Some("/home/privacy/.ssh/agent/s.0JPF1aHX1X.agent.MFxRmRyLG6")
    FZF_DEFAULT_OPTS   : None
    FZF_DEFAULT_COMMAND: Some("fd --type f --hidden --exclude .git")

Text Opener
    default     : Some(OpenerRuleArc(OpenerRule { id: Id(3), run: NonEmptyString("${EDITOR:-vi} %s"), block: true, orphan: false, desc: "$EDITOR", for: Unix, spread: true }))
    block-create: Some(OpenerRuleArc(OpenerRule { id: Id(3), run: NonEmptyString("${EDITOR:-vi} %s"), block: true, orphan: false, desc: "$EDITOR", for: Unix, spread: true }))
    block-rename: Some(OpenerRuleArc(OpenerRule { id: Id(3), run: NonEmptyString("${EDITOR:-vi} %s"), block: true, orphan: false, desc: "$EDITOR", for: Unix, spread: true }))

Multiplexers
    tmux version       : tmux 3.6a
    tmux build flags   : enable-sixel=Unsupported
    ZELLIJ_SESSION_NAME: None
    Zellij version     : No such file or directory (os error 2)

Dependencies
    file          : 5.48
    ueberzugpp    : No such file or directory (os error 2)
    ffmpeg/ffprobe: 8.1.2 / 8.1.2
    pdftoppm      : 26.05.0
    magick        : 7.1.2-18
    fzf           : 0.74.1
    fd/fdfind     : 10.4.2 / No such file or directory (os error 2)
    rg            : 15.2.0
    chafa         : No such file or directory (os error 2)
    zoxide        : 0.9.9
    7zz/7z        : 26.02 / 26.02
    resvg         : No such file or directory (os error 2)
    jq            : 1.8.2

Clipboard
    wl-copy/paste: 2.3.0 / 2.3.0
    xclip        : No such file or directory (os error 2)
    xsel         : No such file or directory (os error 2)

Routine
    `file -bL --mime-type`: text/plain

Describe the bug

When a user has a directory that has been deleted, the ui flickers before putting the user to the original directory where the forward/backward shift was issued from. this leaves the user in a stuck state as they no longer go back/forward the backstack as they're blocked by the now not-existing directory

Minimal reproducer

create a directory structure like:
testing/
├── dir_1
│ ├── subdir_1
│ ├── subdir_2
│ └── subdir_3
└── dir_2
├── subdir_1
├── subdir_2
└── subdir_3
walk the tree by visiting all subdirs in dir_1 then all subdirs in dir_2 so that all subdirs are in the Backstack. Using "back" ( by default) move to dir_2/subdir_1 so that we move in the backstack stack. open a new tab and delete dir_1/subdir_2 (you can move freely, not only using "back"). Return to the original tab and attempt to visit subdir_1 by only using "back." It will get stuck on subdir_3 and refuse to continue further because subdir_2 that's in the stack doesn't exist anymore

Anything else?

No response

Checklist

  • I tried the latest nightly build, and the issue is still reproducible
  • I updated the environment information (ya env) field to the nightly that I tried
  • I can reproduce it after disabling all custom configs/plugins (mv ~/.config/yazi ~/.config/yazi-backup)

Activity

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions