mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Copy the 256-colour flag into the tty saved cell as well as the actual colour,
otherwise colour 8 isn't reset properly.
This commit is contained in:
parent
916669a244
commit
2660692fb1
4
tty.c
4
tty.c
@ -1005,6 +1005,8 @@ tty_attributes(struct tty *tty, const struct grid_cell *gc)
|
|||||||
(gc->flags & GRID_FLAG_FG256) != (tc->flags & GRID_FLAG_FG256)) {
|
(gc->flags & GRID_FLAG_FG256) != (tc->flags & GRID_FLAG_FG256)) {
|
||||||
tty_attributes_fg(tty, gc);
|
tty_attributes_fg(tty, gc);
|
||||||
tc->fg = fg;
|
tc->fg = fg;
|
||||||
|
tc->flags &= ~GRID_FLAG_FG256;
|
||||||
|
tc->flags |= gc->flags & GRID_FLAG_FG256;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set background colour. */
|
/* 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)) {
|
(gc->flags & GRID_FLAG_BG256) != (tc->flags & GRID_FLAG_BG256)) {
|
||||||
tty_attributes_bg(tty, gc);
|
tty_attributes_bg(tty, gc);
|
||||||
tc->bg = bg;
|
tc->bg = bg;
|
||||||
|
tc->flags &= ~GRID_FLAG_BG256;
|
||||||
|
tc->flags |= gc->flags & GRID_FLAG_BG256;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user