Skip to content

Multiple tmux clients causes buggy inputs #2050

@musjj

Description

@musjj

What system are you running Yazi on?

Linux Wayland

What terminal are you running Yazi in?

kitty 0.37.0

yazi --debug output

Yazi
    Version: 0.4.0 (0b340b6 2024-12-09)
    Debug  : false
    Triple : x86_64-unknown-linux-gnu (linux-x86_64)
    Rustc  : 1.82.0 (f6e511ee 2024-10-15)

Ya
    Version: 0.4.0 (0b340b6 2024-12-09)

Emulator
    Brand.from_env      : Some(Kitty)
    Emulator.detect     : Emulator { kind: Left(Kitty), light: false, cell_size: Some((8, 18)) }
    Emulator.detect_full: Ok(Emulator { kind: Left(Kitty), light: false, cell_size: Some((8, 18)) })

Adapter
    Adapter.matches: Kgp

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

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

NVIM
    NVIM          : false
    Neovim version: 0.10.2

Variables
    SHELL           : Some("/run/current-system/sw/bin/zsh")
    EDITOR          : Some("nvim")
    VISUAL          : None
    YAZI_FILE_ONE   : None
    YAZI_CONFIG_HOME: None
    YAZI_ZOXIDE_OPTS: None

Text Opener
    default     : Some(Opener { run: "$EDITOR \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block-create: Some(Opener { run: "$EDITOR \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block-rename: Some(Opener { run: "$EDITOR \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })

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

Dependencies
    file          : 5.45
    ueberzugpp    : No such file or directory (os error 2)
    ffmpeg/ffprobe: 7.1 / 7.1
    pdftoppm      : 24.02.0
    magick        : 7.1.1-39
    fzf           : 0.55.0
    fd/fdfind     : 10.2.0 / No such file or directory (os error 2)
    rg            : 14.1.1
    chafa         : 1.14.4
    zoxide        : 0.9.6
    7z/7zz        : 17.05 / 24.08
    jq            : 1.7.1

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

Describe the bug

When you have multiple active tmux clients sharing the same group, opening yazi in one of them causes other windows in other clients to receive weird key inputs.

Minimal reproducer

  1. First we set up the sessions:
    # Create a base session
    tmux new-session -s base -d
    
    # Create two new sessions in the same group as the base session.
    # They will share the same windows, but can have different views.
    tmux new-session -t base -s child_1 -d
    tmux new-session -t base -s child_2 -d
  2. Let's open a new terminal window. Here, we attach to the first child.
    tmux attach-session -t child_1
  3. Now we open another terminal window and attach to the second child.
    tmux attach-session -t child_2
    Additionally, create a new tmux window by pressing Ctrl+b, then c.
    Finally, we open yazi in this window.
    You should now see strange characters getting inputted to the first terminal window (child_1). I think this varies depending on certain factors, but in my case I'm seeing: :1$r1 q^[\^[[?12;0$y^[[?62;c.

Anything else?

My tmux version:

$ tmux display-message -p "#{version}"
3.5a

I've also made sure that there's no side-effects from custom config:

mv ~/.config/tmux ~/.config/tmux-backup
mv ~/.config/yazi ~/.config/yazi-backup
mv ~/.bashrc ~/.bashrc-backup

Checklist

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

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