aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Leszczak <szatan@gecc.xyz>2020-05-06 13:35:53 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2020-05-12 15:38:02 +0200
commit9c30066e73f0105c3fccb7582c8172d5117857b3 (patch)
treea1f8707d7c3c095e2e6e572d0b0a3fa84b295bb0
parent8304d4f0599b1be2226c28c553547070658d4af3 (diff)
downloadst-patched-9c30066e73f0105c3fccb7582c8172d5117857b3.tar.bz2
st-patched-9c30066e73f0105c3fccb7582c8172d5117857b3.tar.xz
st-patched-9c30066e73f0105c3fccb7582c8172d5117857b3.zip
Fix selection: ignore ATTR_WRAP when rectangular selection in getsel
-rw-r--r--st.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/st.c b/st.c
index 8c42a9c..7c15d5f 100644
--- a/st.c
+++ b/st.c
@@ -634,7 +634,8 @@ getsel(void)
634 * st. 634 * st.
635 * FIXME: Fix the computer world. 635 * FIXME: Fix the computer world.
636 */ 636 */
637 if ((y < sel.ne.y || lastx >= linelen) && !(last->mode & ATTR_WRAP)) 637 if ((y < sel.ne.y || lastx >= linelen) &&
638 (!(last->mode & ATTR_WRAP) || sel.type == SEL_RECTANGULAR))
638 *ptr++ = '\n'; 639 *ptr++ = '\n';
639 } 640 }
640 *ptr = 0; 641 *ptr = 0;