~mil/sxmo-st

ddfed072dc6066668828a77dfebc0917c7dd438d — Jakub Leszczak 4 years ago cab9c8e
Fix selection: ignore ATTR_WRAP when rectangular selection in getsel
1 files changed, 2 insertions(+), 1 deletions(-)

M st.c
M st.c => st.c +2 -1
@@ 647,7 647,8 @@ getsel(void)
		 * st.
		 * FIXME: Fix the computer world.
		 */
		if ((y < sel.ne.y || lastx >= linelen) && !(last->mode & ATTR_WRAP))
		if ((y < sel.ne.y || lastx >= linelen) &&
		    (!(last->mode & ATTR_WRAP) || sel.type == SEL_RECTANGULAR))
			*ptr++ = '\n';
	}
	*ptr = 0;