From 3a35fdc3471e5f8fb6ad57b48abaa4e4db006de3 Mon Sep 17 00:00:00 2001 From: Fredrik Foss-Indrehus Date: Mon, 19 May 2025 01:44:13 +0200 Subject: [PATCH] feat(clipboard): wayclip primary clipboard and correct mimetype (#33990) * Don't specify wayclip mimetype Problem: Since wayclip 0.2, wayclip assumes UTF-8 (text/plain;charset=utf-8) in absence of an explicit mimetype. Since Neovim sets the mimetype to "text/plain" without specifying UTF-8, you will also have to use `-t text/plain` when using waypaste or wayclip outside of Neovim. Solution: Don't specify mimetype when using wayclip, thereby using the default "text/plain:charset=utf-8". * Add primary clipboard support to wayclip wayclip have had support for primary clipboard for some time now. --------- Co-authored-by: Fredrik Foss-Indrehus --- runtime/autoload/provider/clipboard.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim index 32d8841b72..3e281b6f83 100644 --- a/runtime/autoload/provider/clipboard.vim +++ b/runtime/autoload/provider/clipboard.vim @@ -85,10 +85,10 @@ function! s:set_wayland() abort endfunction function! s:set_wayclip() abort - let s:copy['+'] = ['waycopy', '-t', 'text/plain'] - let s:paste['+'] = ['waypaste', '-t', 'text/plain'] - let s:copy['*'] = s:copy['+'] - let s:paste['*'] = s:paste['+'] + let s:copy['+'] = ['waycopy'] + let s:paste['+'] = ['waypaste'] + let s:copy['*'] = ['waycopy', '-p'] + let s:paste['*'] = ['waypaste', '-p'] return 'wayclip' endfunction