mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-26 01:32:25 +00:00
Robert de Bath's patch: be a little more careful of main and
alternate screens when resizing the window. Should avoid lines of alternate screen showing up in scrollback buffer. [originally from svn r403]
This commit is contained in:
parent
06060def52
commit
118524f442
@ -204,9 +204,14 @@ void term_size(int newrows, int newcols, int newsavelines) {
|
|||||||
unsigned long *newtext, *newdisp, *newwant, *newalt;
|
unsigned long *newtext, *newdisp, *newwant, *newalt;
|
||||||
int i, j, crows, ccols;
|
int i, j, crows, ccols;
|
||||||
|
|
||||||
|
int save_alt_which = alt_which;
|
||||||
|
|
||||||
if (newrows == rows && newcols == cols && newsavelines == savelines)
|
if (newrows == rows && newcols == cols && newsavelines == savelines)
|
||||||
return; /* nothing to do */
|
return; /* nothing to do */
|
||||||
|
|
||||||
|
deselect();
|
||||||
|
swap_screen(0);
|
||||||
|
|
||||||
alt_t = marg_t = 0;
|
alt_t = marg_t = 0;
|
||||||
alt_b = marg_b = newrows - 1;
|
alt_b = marg_b = newrows - 1;
|
||||||
|
|
||||||
@ -280,7 +285,8 @@ void term_size(int newrows, int newcols, int newsavelines) {
|
|||||||
savelines = newsavelines;
|
savelines = newsavelines;
|
||||||
fix_cpos;
|
fix_cpos;
|
||||||
|
|
||||||
deselect();
|
swap_screen(save_alt_which);
|
||||||
|
|
||||||
update_sbar();
|
update_sbar();
|
||||||
term_update();
|
term_update();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user