From 97307150b7686a74672862f6ff43dd352feaa319 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Sun, 1 Nov 2020 02:34:44 -0500 Subject: patch: selection-unfuck This patch addresses two issues with selections in st. First, the SelectionClear signal from X is no longer ignored. So, if another selection is made in another window, st's selection will disappear. Second (and this one is more of a personal preference), new selections that begin after the end of a line are now considered to begin at the start of the following line. This makes selecting a group of lines easier for either copy/paste or readability in the terminal. Previously, the newline character from the preceeding line would be included in the clipboard and the dead-space at the end of that line would be highlighted. --- x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'x.c') diff --git a/x.c b/x.c index 4da8c2c..5fb0108 100644 --- a/x.c +++ b/x.c @@ -213,7 +213,7 @@ static void (*handler[LASTEvent])(XEvent *) = { * Uncomment if you want the selection to disappear when you select something * different in another window. */ -/* [SelectionClear] = selclear_, */ + [SelectionClear] = selclear_, [SelectionNotify] = selnotify, /* * PropertyNotify is only turned on when there is some INCR transfer happening -- cgit v1.2.3