Fix selection: ignore ATTR_WRAP when rectangular selection in getsel

This commit is contained in:
Jakub Leszczak 2020-05-06 13:35:53 +02:00 committed by Hiltjo Posthuma
parent 8304d4f059
commit 9c30066e73

3
st.c
View File

@ -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;