mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-13 09:07:33 -05:00
Save and restore true-colour state with the cursor.
I spotted this myself while looking through the code in search of the cause of the background-colour-erase bug: saving and restoring the cursor via ESC 7 / ESC 8 ought to also save and restore the current graphics rendition attributes including foreground and background colour settings, but it was not saving and restoring the new term->curr_truecolour along with term->curr_attr. So there's now a term->save_truecolour to keep that in, and also a term->alt_save_truecolour to take account of the fact that all the saved cursor state variables get swapped out _again_ when switching between the main and alternate screens. (However, there is not a term->alt_truecolour to complete the cross product, because the _active_ graphics rendition is carried over when switching between the terminal screens; it's only the _saved_ one from ESC 7 / ESC 8 that is saved separately. That's consistent with the behaviour we've had all along for ordinary fg/bg colour selection.)
This commit is contained in:
@ -140,6 +140,7 @@ struct terminal_tag {
|
||||
/* ESC 7 saved state for the alternate screen */
|
||||
pos alt_savecurs;
|
||||
int alt_save_attr;
|
||||
truecolour alt_save_truecolour;
|
||||
int alt_save_cset, alt_save_csattr;
|
||||
int alt_save_utf, alt_save_wnext;
|
||||
int alt_save_sco_acs;
|
||||
|
Reference in New Issue
Block a user