not emulate the vt100 behaviour of selecting all whitespaces. Thanks!
int x, y, bufsize, is_selected = 0, size;
Glyph *gp;
int x, y, bufsize, is_selected = 0, size;
Glyph *gp;
for(x = 0; x < term.col; x++) {
gp = &term.line[y][x];
for(x = 0; x < term.col; x++) {
gp = &term.line[y][x];
- if(!(is_selected = selected(x, y)))
+ if(!(is_selected = selected(x, y))
+ || !(gp->state & GLYPH_SET)) {
- p = (gp->state & GLYPH_SET) ? gp->c : " ";
- size = utf8size(p);
- memcpy(ptr, p, size);
+ }
+ size = utf8size(gp->c);
+ memcpy(ptr, gp->c, size);
ptr += size;
}
/* \n at the end of every selected line except for the last one */
ptr += size;
}
/* \n at the end of every selected line except for the last one */