st
simple terminal
git clone https://9o.is/git/st.git
commit a5b859e9aa7ac8378f7dcf30b36ea5660c123001 parent 52b56089c12c33d6ee773988f858a75447fad8fb Author: Alexander Sedov <alex0player@gmail.com> Date: Sun, 14 Apr 2013 23:17:44 +0400 Strip trailing spaces from lines when copying selection. Signed-off-by: Christoph Lohmann <20h@r-36.net> Diffstat:
| M | st.c | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/st.c b/st.c @@ -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) {