diff options
author | nicm <nicm> | 2016-10-12 13:24:07 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-10-12 13:24:07 +0000 |
commit | 4160df4ca4035c8caafce7650d0fcbcccc391f80 (patch) | |
tree | 4900cee4d755e18393587cb14cc4e8f662764504 /tty.c | |
parent | 68bebe1fb7dfe5d152a2734c5bd572b1db641a4c (diff) | |
download | rtmux-4160df4ca4035c8caafce7650d0fcbcccc391f80.tar.gz rtmux-4160df4ca4035c8caafce7650d0fcbcccc391f80.tar.bz2 rtmux-4160df4ca4035c8caafce7650d0fcbcccc391f80.zip |
Redraw selection in tty_draw_line, so it appears when redrawing whole
pane. Reported by Theo Buehler.
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -658,7 +658,7 @@ void tty_draw_line(struct tty *tty, const struct window_pane *wp, struct screen *s, u_int py, u_int ox, u_int oy) { - struct grid_cell gc; + struct grid_cell gc, tmp_gc; struct grid_line *gl; u_int i, sx; int flags; @@ -687,7 +687,11 @@ tty_draw_line(struct tty *tty, const struct window_pane *wp, for (i = 0; i < sx; i++) { grid_view_get_cell(s->grid, i, py, &gc); - tty_cell(tty, &gc, wp); + if (gc.flags & GRID_FLAG_SELECTED) { + screen_select_cell(s, &tmp_gc, &gc); + tty_cell(tty, &tmp_gc, wp); + } else + tty_cell(tty, &gc, wp); } if (sx < tty->sx) { |