--- st.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/st.c b/st.c index 8641a7a..532d706 100644 --- a/st.c +++ b/st.c _AT_@ -691,7 +691,6 @@ void selcopy(void) { char *str, *ptr, *p; int x, y, bufsize, is_selected = 0, size; - Glyph *gp; if(sel.bx == -1) { str = NULL; _AT_@ -701,9 +700,11 @@ selcopy(void) { /* append every set & selected glyph to the selection */ for(y = 0; y < term.row; y++) { - for(x = 0; x < term.col; x++) { - gp = &term.line[y][x]; + Glyph *gp = &term.line[y][0], *last = gp + term.col; + while(--last >= gp && !(last->state & GLYPH_SET)) + /* nothing */; + for(x = 0; gp <= last; x++, ++gp) { if(!(is_selected = selected(x, y))) continue; p = (gp->state & GLYPH_SET) ? gp->c : " "; -- 1.7.10.4 --BOKacYhQ+x31HxR3--Received on Mon Sep 17 2001 - 00:00:00 CEST
This archive was generated by hypermail 2.3.0 : Thu Oct 11 2012 - 19:48:02 CEST