Fix selection: ignore ATTR_WRAP when rectangular selection in getsel

This commit is contained in:
bakkeby 2020-05-20 14:29:02 +02:00
parent 18b2af6546
commit e3a567ed79
2 changed files with 4 additions and 3 deletions

3
st.c
View file

@ -696,7 +696,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;