Fixed copying empty lines inside selection.
authorAlexander <alex0player@gmail.com>
Mon, 26 May 2014 05:23:56 +0000 (09:23 +0400)
committerRoberto E. Vargas Caballero <k0ga@shike2.com>
Tue, 27 May 2014 06:37:12 +0000 (08:37 +0200)
The code was assuming that empty lines have implicit wrap-around attribute.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
st.c

diff --git a/st.c b/st.c
index 6424b54..506be0f 100644 (file)
--- a/st.c
+++ b/st.c
@@ -949,7 +949,7 @@ getsel(void) {
                 * st.
                 * FIXME: Fix the computer world.
                 */
-               if(y < sel.ne.y && x > 0 && !((gp-1)->mode & ATTR_WRAP))
+               if(y < sel.ne.y && !(x > 0 && (gp-1)->mode & ATTR_WRAP))
                        *ptr++ = '\n';
 
                /*