aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorpancake@nopcode.org2011-04-01 09:35:38 +0200
committerpancake@nopcode.org2011-04-01 09:35:38 +0200
commit27547fa44617ec973abf098bc84f5561cc0dec95 (patch)
tree1521626e829a06be342dcfbc033daf240f8a2e4a
parent7e2c507f77399cd4c0fa8bdab6145debc8904635 (diff)
downloadaur-27547fa44617ec973abf098bc84f5561cc0dec95.tar.gz
do not add newline to selection text if next line not selected (Nick)
-rw-r--r--st.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/st.c b/st.c
index d0a607b116a3..561d5b05c00c 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;
}