aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-06-29 22:03:09 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-06-29 22:03:09 +0000
commitedc2e7da988cc547016c6d80f9f7a7c415ece28e (patch)
treec595ace26bc1fa9e1a6740b79d3c7d2a227640c5
parent796b2e3ec935204fb4efccc5912e8db21eb24909 (diff)
downloadrtmux-edc2e7da988cc547016c6d80f9f7a7c415ece28e.tar.gz
rtmux-edc2e7da988cc547016c6d80f9f7a7c415ece28e.tar.bz2
rtmux-edc2e7da988cc547016c6d80f9f7a7c415ece28e.zip
Copy the 256-colour flag into the tty saved cell as well as the actual colour,
otherwise colour 8 isn't reset.
-rw-r--r--tty.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tty.c b/tty.c
index 89ad38bf..239bc5a4 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.107 2009-06-25 16:34:50 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.8 2009/06/27 12:57:14 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1015,6 +1015,8 @@ tty_attributes(struct tty *tty, const struct grid_cell *gc)
(gc->flags & GRID_FLAG_FG256) != (tc->flags & GRID_FLAG_FG256)) {
tty_attributes_fg(tty, gc);
tc->fg = fg;
+ tc->flags &= ~GRID_FLAG_FG256;
+ tc->flags |= gc->flags & GRID_FLAG_FG256;
}
/* Set background colour. */
@@ -1022,6 +1024,8 @@ tty_attributes(struct tty *tty, const struct grid_cell *gc)
(gc->flags & GRID_FLAG_BG256) != (tc->flags & GRID_FLAG_BG256)) {
tty_attributes_bg(tty, gc);
tc->bg = bg;
+ tc->flags &= ~GRID_FLAG_BG256;
+ tc->flags |= gc->flags & GRID_FLAG_BG256;
}
}