aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2016-10-13 08:09:47 +0100
committerThomas Adam <thomas@xteddy.org>2016-10-13 08:09:47 +0100
commit6551f4bb3b651aa2dba77a98cc42828737b88306 (patch)
tree82dd6cbba583e9d4bc58a9334a8b74713d94da89 /tty.c
parent76a9e6f27bb0c7b547989c3b80cf8cc0a148064d (diff)
parente0add119ea4a6c8d40905a7ad1f7bc3553d20ccc (diff)
downloadrtmux-6551f4bb3b651aa2dba77a98cc42828737b88306.tar.gz
rtmux-6551f4bb3b651aa2dba77a98cc42828737b88306.tar.bz2
rtmux-6551f4bb3b651aa2dba77a98cc42828737b88306.zip
Merge branch 'obsd-master'
Conflicts: paste.c
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index d8702a2f..c4adfe82 100644
--- a/tty.c
+++ b/tty.c
@@ -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) {