mirror of
https://github.com/alrayyes/st.git
synced 2024-11-23 03:36:21 +00:00
Strip trailing spaces from lines when copying selection.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
This commit is contained in:
parent
c371fe58a3
commit
0ca0dd8b11
1 changed files with 2 additions and 1 deletions
3
st.c
3
st.c
|
@ -773,7 +773,8 @@ selcopy(void) {
|
||||||
gp = &term.line[y][0];
|
gp = &term.line[y][0];
|
||||||
last = gp + term.col;
|
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 */;
|
/* nothing */;
|
||||||
|
|
||||||
for(x = 0; gp <= last; x++, ++gp) {
|
for(x = 0; gp <= last; x++, ++gp) {
|
||||||
|
|
Loading…
Reference in a new issue