diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-06-27 12:57:14 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-06-27 12:57:14 +0000 |
commit | 2660692fb18499bedd1f81f8ec88fab1acfd80bc (patch) | |
tree | 9aee331afb1179af6b1408cf00dc02d28b4f1ad0 | |
parent | 916669a24404f3850c12bdf7e7a284edd27549fa (diff) | |
download | rtmux-2660692fb18499bedd1f81f8ec88fab1acfd80bc.tar.gz rtmux-2660692fb18499bedd1f81f8ec88fab1acfd80bc.tar.bz2 rtmux-2660692fb18499bedd1f81f8ec88fab1acfd80bc.zip |
Copy the 256-colour flag into the tty saved cell as well as the actual colour,
otherwise colour 8 isn't reset properly.
-rw-r--r-- | tty.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1005,6 +1005,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. */ @@ -1012,6 +1014,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; } } |