Redraw selection in tty_draw_line, so it appears when redrawing whole

pane. Reported by Theo Buehler.
This commit is contained in:
nicm
2016-10-12 13:24:07 +00:00
parent 68bebe1fb7
commit 4160df4ca4
4 changed files with 25 additions and 7 deletions

View File

@ -371,6 +371,22 @@ screen_check_selection(struct screen *s, u_int px, u_int py)
return (1);
}
/* Get selected grid cell. */
void
screen_select_cell(struct screen *s, struct grid_cell *dst,
const struct grid_cell *src)
{
if (!s->sel.flag)
return;
memcpy(dst, &s->sel.cell, sizeof *dst);
utf8_copy(&dst->data, &src->data);
dst->attr = dst->attr & ~GRID_ATTR_CHARSET;
dst->attr |= src->attr & GRID_ATTR_CHARSET;
dst->flags = src->flags;
}
/* Reflow wrapped lines. */
static void
screen_reflow(struct screen *s, u_int new_x)