~petersanchez/st

9c30066e73f0105c3fccb7582c8172d5117857b3 — Jakub Leszczak 4 years ago 8304d4f
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
@@ 634,7 634,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;