top: reduce use of 'clear_screen' to absolute minimum
Along the way to width override support (-w switch),
this top began clearing the screen far more often
than his predecessor. In fact, it happend with each
user keystroke.
This commit dramatically reduces those occurances.
The screen will now be cleared only when an actual
SIGWINCH is received.
Thanks for identifying this flaw belongs to:
James Cloos, cloos@jhcloos.com
References:
http://www.freelists.org/post/procps/Merge-request
Blame: c2dcbef482
Author: Jim Warner <james.warner@comcast.net>
Date: Thu May 26 11:33:32 2011 +0200
subject: added output width/height override support to top, + misc
This commit is contained in:
parent
9e7dd43ab7
commit
9349100dd3
@ -568,7 +568,7 @@ static void sig_paused (int dont_care_sig) {
|
||||
* SIGCONT and SIGWINCH */
|
||||
static void sig_resize (int dont_care_sig) {
|
||||
(void)dont_care_sig;
|
||||
Frames_resize = 1;
|
||||
Frames_resize = 2;
|
||||
} // end: sig_resize
|
||||
|
||||
/*###### Misc Color/Display support ####################################*/
|
||||
@ -1357,7 +1357,7 @@ static void adj_geometry (void) {
|
||||
Pseudo_screen = alloc_r(Pseudo_screen, pseudo_max);
|
||||
}
|
||||
PSU_CLREOS(0);
|
||||
if (Frames_resize) putp(Cap_clr_scr);
|
||||
if (Frames_resize > 1) putp(Cap_clr_scr);
|
||||
} // end: adj_geometry
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user