From ff97be88d59fb4a5c00b9f1db2e64fb15396d77d Mon Sep 17 00:00:00 2001 From: "pancake@nopcode.org" Date: Fri, 1 Apr 2011 09:35:38 +0200 Subject: [PATCH] do not add newline to selection text if next line not selected (Nick) --- st.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/st.c b/st.c index d0a607b..561d5b0 100644 --- a/st.c +++ b/st.c @@ -420,8 +420,8 @@ selcopy(void) { memcpy(ptr, term.line[y][x].c, sl); ptr += sl; } - if(ls) - *ptr = '\n', ptr++; + if(ls && y < sel.e.y) + *ptr++ = '\n'; } *ptr = 0; }