[BUG] Link click-to-copy sets clipboard as application/octet-stream, breaking paste in browsers (missing wl-copy --type on Wayland)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- linux, lua, neovim
- Lĩnh vực
- desktop-dev, tooling
Hướng nghiên cứu
Bắt đầu từ trình xử lý sao chép liên kết được dùng khi một URL được sao chép từ :ClaudeCode, rồi truy vết xem nó gọi trực tiếp wl-copy hay sử dụng vim.fn.setreg("+", url). Xác minh bản sửa bằng wl-paste -l và Firefox hoặc Chromium; hoàn tất khi clipboard cung cấp text/plain và URL có thể được dán vào các ứng dụng GUI Wayland.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Clicking a link in the Claude terminal (opened via :ClaudeCode) copies it to
the clipboard with a notification confirming success, but the copied content
cannot be pasted into Firefox or Chromium on Wayland. Pasting into terminal
tools (wl-paste) works fine — only GUI applications using the standard
wl_data_device_manager protocol fail to read it.
Environment
- OS: Kicksecure (Debian 13/trixie)
- Compositor: labwc 0.8.3 (wlroots-based)
- Terminal: kitty 0.41.1
- Terminal provider: snacks (
terminal.provider = "snacks") wl-clipboardinstalled and confirmed working correctly for manual
wl-copy --type text/plaincalls
Steps to reproduce
- Open
:ClaudeCode, get Claude to output a URL - Double-click the link to copy it (plugin shows a "copied" notification)
- Try to paste (
Ctrl+V) into Firefox's address bar, or Chromium's - Nothing pastes; the field remains empty or unchanged
Diagnosis
Running wl-paste -l immediately after step 2 shows only:
application/octet-stream
By contrast:
-
wl-copy --type text/plain "url"followed bywl-paste -lcorrectly
showstext/plain,text/plain;charset=utf-8,UTF8_STRING, etc., and
pastes into Firefox/Chromium without issue. -
A manual OSC 52 sequence sent directly to kitty (
printf '\033]52;c;...')
is also correctly typed astext/plainby kitty itself — so kitty's own
OSC 52 → Wayland clipboard bridge is not at fault. -
Plain
echo "text" | wl-copy(no--type) also produces
application/octet-streamon this system, matching wl-clipboard's
documented limitation:wl-clipboard is not always able to detect that a MIME type is textual,
which may break pasting into clients that expect textual formats, not
application/something. The workaround […] is to specify the desired
MIME type explicitly, such aswl-copy --type text/plain.
— wl-copy(1) manpage, BUGS section
This strongly suggests the link-copy code path shells out to wl-copy
without an explicit --type, hitting this known/documented wl-clipboard
limitation, rather than going through Neovim's own clipboard provider
(vim.fn.setreg("+", url)), which I confirmed produces correctly-typed
text/plain clipboard content on the same system (tested via "+yy on a
normal buffer, checked with wl-paste -l).
Suggested fix
If the link-copy handler invokes wl-copy directly, adding --type text/plain (as documented as the standard workaround for this exact
wl-clipboard limitation) should resolve it. Alternatively, routing the copy
through Neovim's vim.fn.setreg("+", url) instead of a raw external
wl-copy call would also sidestep the issue, since that path is confirmed
to type the content correctly on this system.
Happy to test a fix if useful — this was fully reproducible and isolated
step by step (system Wayland clipboard, kitty's native OSC 52 handling, and
Neovim's own clipboard provider were all individually verified to work
correctly, narrowing the issue down to this specific code path).
- Ngôn ngữ chính
- Lua
- Star
- 3.1k
- Fork
- 217
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coder/claudecode.nvim
-
bug needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
coder/claudecode.nvim#314 ·
-
Is this plugin abondonned? Đang mởneeds-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
coder/claudecode.nvim#319 · 1 reaction ·
-
[BUG] 框选文本一直抱错误信息 Đang mởbug needs-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
coder/claudecode.nvim#316 · 1 bình luận ·
-
needs-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
coder/claudecode.nvim#309 ·
-
needs-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
coder/claudecode.nvim#306 ·
Tất cả issue của coder/claudecode.nvim
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
openSUSE/python-rpm-macros#219 ·
-
bug mini.bracketed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
accessibility bug typst
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
quarto-dev/quarto-cli#14947 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100