zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.52k stars 2.63k forks source link

Cross window copy paste doesn't work on linux #14415

Closed HKalbasi closed 2 weeks ago

HKalbasi commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

With two zed windows, I can't copy a text from one into another, and I need to paste it inside a gedit, copy it again and paste it on the destination to workaround this issue.

Environment

Zed: v0.143.6 (Zed) OS: Linux Wayland ubuntu 22.04 Memory: 7.7 GiB Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log


Arajtav commented 1 month ago

I can't even copy paste from one Zed instance to the same instance, zed 0.143.7-2, arch linux x86_64 with hyprland (wayland compositor). edit: I just realized I still have clone of repo from which I built, last commit I have is 951fbc57b, on which copy paste worked. I assume it's a problem with code, not with package repos building stuff broken. I can't bisect to what commit introduced that because my laptop was overheating and crashing when I was building. I may try to do that later on better pc when I will be home.

sshine commented 1 month ago

I also came to report this (Linux, Wayland, GNOME). An additional observation:

It seems as if they're sharing a single channel somewhere.

Zed: 0.141.3 (/nix/store/6xk0j54s5fcsf7ivxysy0nb58d6iw4ii-zed-0.141.3/libexec/zed-editor) OS: NixOS (unstable) Architecture: x86_64

TMBL-DEV commented 1 month ago

i have the same issue

Os: pop os cosmic alpha (uses wayland) Architecture: x86_64

bneijt commented 1 month ago

I have the same issue on. zeditor --version just gives me Zed – /usr/lib/zed/zed-editor, so not sure which version this is.

My zed comes from extra/zed 0.144.4-1 on Archlinux. My xdpyinfo starts with:

name of display:    :0
version number:    11.0
vendor string:    The X.Org Foundation
vendor release number:    12401001
X.Org version: 24.1.1
m3rashid commented 1 month ago

It also shows different keybindings for copy-paste sometimes (even when I have vim mode disabled) image And these don't even work

xhos commented 1 month ago

I'm probably having the same issue, can't paste anything into Zed at all, but can copy from zed and paste into Firefox, for example.

NixOS, Hyprland, latest Zed from unstable nixpkgs (0.141.3)

aiden3c commented 1 month ago

Also getting this issue running Zed 0.146.3 Running Debian Bookworm with Gnome and Wayland

apricotbucket28 commented 1 month ago

The wl_data_device::selection event states this:

The data_offer is valid until a new data_offer or NULL is received or until the client loses keyboard focus. Switching surface with keyboard focus within the same client doesn't mean a new selection will be sent.

This seems to be the issue. I cannot reproduce on KDE but the spec states that we must handle this differently. I'll take a stab at this later.