summaryrefslogtreecommitdiffstats
path: root/no-EOL-to-wl-clipboard.patch
blob: 9db46d706c4fa544ea9d04c6051d4e9de9cd22b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Return-Path: <mcepl@cepl.eu>
Delivered-To: <mcepl@cepl.eu>
Received: from redcrew.org
	by redcrew.org (Dovecot) with LMTP id WRniDQJfz2EqMQAAsTppAA
	for <mcepl@cepl.eu>; Fri, 31 Dec 2021 21:00:20 +0100
Received: from stitny.localdomain (unknown [83.208.252.159])
	(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by redcrew.org (Postfix) with ESMTPSA id 38AC7C70;
	Fri, 31 Dec 2021 21:00:18 +0100 (CET)
Received: from stitny.localdomain (localhost [127.0.0.1])
	by stitny.localdomain (Postfix) with ESMTP id 79FC54BDC4DD;
	Fri, 31 Dec 2021 21:00:17 +0100 (CET)
From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= <mcepl@cepl.eu>
To: ~martanne/devel@lists.sr.ht
Cc: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= <mcepl@cepl.eu>
Subject: [vis] wl-paste and wl-copy should not add \n to the end of the clipboard.
Date: Fri, 31 Dec 2021 20:56:32 +0100
Message-Id: <20211231195631.12681-1-mcepl@cepl.eu>
X-Mailer: git-send-email 2.34.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Hello,

it is very uncomfortable, that vis-clipboard (at least for me)
always adds \n to the pasted text. I am not sure whether it
is because of missing -n for wl-copy or the missing one for
wl-paste, so I have added the one for both, and I am very much
open to the discussion on the possible better solution.

Best,

Matěj

---
 vis-clipboard |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/vis-clipboard
+++ b/vis-clipboard
@@ -89,9 +89,9 @@ vc_wlclipboard_copy() {
 
 vc_wlclipboard_paste() {
 	if [ "$sel" = "primary" ]; then
-		wl-paste --primary -t text
+		wl-paste --no-newline --primary -t text
 	else
-		wl-paste -t text
+		wl-paste --no-newline -t text
 	fi
 }