summaryrefslogblamecommitdiffstats
path: root/no-EOL-to-wl-clipboard.patch
blob: 91a6c6c351402dc7b2161dd5310b30cb00a7930c (plain) (tree)






























































                                                                                   
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 |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/vis-clipboard
+++ b/vis-clipboard
@@ -81,17 +81,17 @@ vc_paste() {
 
 vc_wlclipboard_copy() {
 	if [ "$sel" = "primary" ]; then
-		wl-copy --primary -t TEXT
+		wl-copy --trim-newline --primary -t TEXT
 	else
-		wl-copy -t TEXT
+		wl-copy --trim-newline -t TEXT
 	fi
 }
 
 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
 }