kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.62k stars 986 forks source link

Copy & paste into wrong Kitty instance #8047

Closed ChristophSchmidpeter closed 1 day ago

ChristophSchmidpeter commented 1 day ago

Describe the bug Having two ore more kitty instances open, copy & paste sporadically copies in wrong instance. E.g. you have Instance1 and paste into it, copied text appears into Instance2

To Reproduce Steps to reproduce the behavior:

  1. Open 2 Kitty instances
  2. Copy text from e.g. your browser
  3. Paste into Instance1
  4. Text is pasted into Instance2

Environment details

kitty 0.37.0 created by Kovid Goyal
Linux vbm 6.10.0-zen1-2-zen #1 ZEN SMP PREEMPT_DYNAMIC Mon, 22 Jul 2024 17:45:00 +0000 x86_64
Arch Linux 6.10.0-zen1-2-zen (/dev/tty)

Running under: Wayland (Hyprland v0.44.1,) missing: blur
OpenGL: '4.6 (Core Profile) Mesa 24.2.6-arch1.1' Detected version: 4.6
Frozen: False
Fonts:
  medium: NotoSansMono-Regular: /usr/share/fonts/noto/NotoSansMono-Regular.ttf:0
          Features: ()
    bold: NotoSansMono-Bold: /usr/share/fonts/noto/NotoSansMono-Bold.ttf:0
          Features: ()
  italic: NotoSansMono-Regular: /usr/share/fonts/noto/NotoSansMono-Regular.ttf:0
          Features: ()
      bi: NotoSansMono-Bold: /usr/share/fonts/noto/NotoSansMono-Bold.ttf:0
          Features: ()
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /bin/zsh
Loaded config files:
  /home/vbm/.config/kitty/kitty.conf
Loaded config overrides:
  allow_remote_control yes

Config options different from defaults:
allow_remote_control yes
enable_audio_bell    False
font_size            24.0
scrollback_lines     5000
startup_session      /home/vbm/.config/kitty/session.conf
Added shortcuts:
    alt+i →  next_tab
    alt+j →  scroll_line_down
    alt+k →  scroll_line_up
    alt+o →  previous_tab
    alt+q →  show_scrollback
    alt+x →  close_window
    ctrl+alt+a →  move_tab_backward
    ctrl+alt+e →  move_tab_forward
    ctrl+alt+p →  toggle_layout stack
    ctrl+alt+s →  goto_layout stack
    ctrl+alt+t →  set_tab_title
    ctrl+alt+z →  last_used_layout
    ctrl+down →  neighboring_window bottom
    ctrl+left →  neighboring_window left
    ctrl+p →  nth_window -1
    ctrl+q →  close_tab
    ctrl+right →  neighboring_window right
    ctrl+shift+m →  toggle_marker iregex 1 \\bERROR\\b 2 \\bWARNING\\b
    ctrl+up →  neighboring_window up
    ctrl+v →  paste_from_clipboard
    kitty_mod+y →  launch neomutt
    shift+super+i →  set_tab_title
    super+c →  copy_to_clipboard
    super+q →  quit
    super+v →  paste_from_clipboard
Changed shortcuts:
    kitty_mod+h →  kitten pass_keys.py neighboring_window left   ctrl+h
    kitty_mod+j →  kitten pass_keys.py neighboring_window bottom ctrl+j
    kitty_mod+k →  kitten pass_keys.py neighboring_window top    ctrl+k
    kitty_mod+l →  kitten pass_keys.py neighboring_window right  ctrl+l

Important environment variables seen by the kitty process:
    PATH                                /usr/local/bin:/usr/bin:/var/lib/snapd/snap/bin
    LANG                                en_GB.UTF-8
    EDITOR                              vim
    SHELL                               /bin/zsh
    GLFW_IM_MODULE                      ibus 
    DISPLAY                             :0
    WAYLAND_DISPLAY                     wayland-1
    USER                                vbm
    XCURSOR_SIZE                        32
    XDG_BACKEND                         wayland
    LC_MONETARY                         de_DE.UTF-8
    XDG_SEAT                            seat0
    XDG_SESSION_DESKTOP                 hyprland
    XDG_SESSION_TYPE                    wayland
    LC_PAPER                            de_DE.UTF-8
    XDG_CURRENT_DESKTOP                 Hyprland
    XDG_SESSION_CLASS                   user
    LC_MEASUREMENT                      de_DE.UTF-8
    XDG_VTNR                            2
    XDG_SESSION_ID                      1
    XDG_RUNTIME_DIR                     /run/user/1000
    LC_TIME                             de_DE.UTF-8
    XDG_DATA_DIRS                       /usr/local/share/:/usr/share/:/var/lib/snapd/desktop
    LC_NUMERIC                          de_DE.UTF-8

On older versions of kitty, run kitty --debug-config instead

Additional context Try to reproduce the problem with kitty --config NONE if you cannot then post a minimal kitty.conf that reproduces the problem. If the problem involves interaction with some other terminal program post a minimal config for that program to reproduce the problem as well.

kovidgoyal commented 1 day ago

Does not reproduce for me with those steps. I copy and paste into different kitty instances under wayland all day long. And I tested it with hyprland repeating 5 times, did not reproduce. If you can come up with a reproducer I can help otherwise there's not much I can do.