Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
st.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Strip trailing spaces from lines when copying selection.
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
7250da2
..
56dc94c
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-773,7
+773,8
@@
selcopy(void) {
gp = &term.line[y][0];
last = gp + term.col;
gp = &term.line[y][0];
last = gp + term.col;
- while(--last >= gp && !(last->state & GLYPH_SET))
+ while(--last >= gp && !((last->state & GLYPH_SET) && \
+ selected(last - gp, y) && strcmp(last->c, " ") != 0))
/* nothing */;
for(x = 0; gp <= last; x++, ++gp) {
/* nothing */;
for(x = 0; gp <= last; x++, ++gp) {