From fc9748e2e887d65f58219e2d013d8ff6695688c3 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 15 Aug 2006 22:48:01 +0000 Subject: [PATCH] Er, ahem. Other half of r6788. :-/ git-svn-id: svn://svn.tartarus.org/sgt/putty@6791 cda61777-01e9-0310-a592-d414129be87e --- terminal.c | 7 ++++++- terminal.h | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/terminal.c b/terminal.c index c24926ae..b88fe069 100644 --- a/terminal.c +++ b/terminal.c @@ -1211,7 +1211,8 @@ static void power_on(Terminal *term, int clear) term->in_vbell = FALSE; term->cursor_on = 1; term->big_cursor = 0; - term->default_attr = term->save_attr = term->curr_attr = ATTR_DEFAULT; + term->default_attr = term->save_attr = + term->alt_save_attr = term->curr_attr = ATTR_DEFAULT; term->term_editing = term->term_echoing = FALSE; term->app_cursor_keys = term->cfg.app_cursor; term->app_keypad_keys = term->cfg.app_keypad; @@ -1812,6 +1813,10 @@ static void swap_screen(Terminal *term, int which, int reset, int keep_cur_pos) if (!reset && !keep_cur_pos) term->save_csattr = term->alt_save_csattr; term->alt_save_csattr = t; + t = term->save_attr; + if (!reset && !keep_cur_pos) + term->save_attr = term->alt_save_attr; + term->alt_save_attr = t; t = term->save_utf; if (!reset && !keep_cur_pos) term->save_utf = term->alt_save_utf; diff --git a/terminal.h b/terminal.h index c98a746d..4288d618 100644 --- a/terminal.h +++ b/terminal.h @@ -135,6 +135,13 @@ struct terminal_tag { bufchain printer_buf; /* buffered data for printer */ printer_job *print_job; + /* ESC 7 saved state for the alternate screen */ + pos alt_savecurs; + int alt_save_attr; + int alt_save_cset, alt_save_csattr; + int alt_save_utf, alt_save_wnext; + int alt_save_sco_acs; + int rows, cols, savelines; int has_focus; int in_vbell; -- 2.11.0