aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/st.c b/st.c
index 9a41c5b..2e55963 100644
--- a/st.c
+++ b/st.c
@@ -920,7 +920,7 @@ bpress(XEvent *e) {
920char * 920char *
921getsel(void) { 921getsel(void) {
922 char *str, *ptr; 922 char *str, *ptr;
923 int x, y, bufsize, size, i, ex; 923 int x, y, bufsize, size, ex;
924 Glyph *gp, *last; 924 Glyph *gp, *last;
925 925
926 if(sel.ob.x == -1) 926 if(sel.ob.x == -1)
@@ -965,13 +965,10 @@ getsel(void) {
965 * after the visible text '\n' is appended. 965 * after the visible text '\n' is appended.
966 */ 966 */
967 if(y == sel.ne.y) { 967 if(y == sel.ne.y) {
968 i = term.col;
969 while(--i > 0 && term.line[y][i].c[0] == ' ')
970 /* nothing */;
971 ex = sel.ne.x; 968 ex = sel.ne.x;
972 if(sel.nb.y == sel.ne.y && sel.ne.x < sel.nb.x) 969 if(sel.nb.y == sel.ne.y && sel.ne.x < sel.nb.x)
973 ex = sel.nb.x; 970 ex = sel.nb.x;
974 if(i < ex) 971 if(tlinelen(y) < ex)
975 *ptr++ = '\n'; 972 *ptr++ = '\n';
976 } 973 }
977 } 974 }