diff options
author | Alexander Sedov <alex0player@gmail.com> | 2013-04-14 23:17:44 +0400 |
---|---|---|
committer | Christoph Lohmann <20h@r-36.net> | 2013-04-14 21:32:53 +0200 |
commit | 0ca0dd8b11ec0febc547e485395b7c9ec01e2866 (patch) | |
tree | 5e04f896052180fc1022053320fe512f06bfc37e | |
parent | c371fe58a36abbfbf684e62d6b4026173dbc79be (diff) | |
download | st-0ca0dd8b11ec0febc547e485395b7c9ec01e2866.tar.gz st-0ca0dd8b11ec0febc547e485395b7c9ec01e2866.tar.bz2 |
Strip trailing spaces from lines when copying selection.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
-rw-r--r-- | st.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -773,7 +773,8 @@ selcopy(void) { 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) { |