From ee0169fd024234bd924e7c36610298d597ee0598 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Wed, 15 Jun 2022 00:00:00 -0500 Subject: [PATCH] top: fix a bug from when 'Ctrl' window was made sticky <=== port of newlib 793f3e85 ______________________________ original commit message ----------------------------------- ( minus git hash ) In the patch referenced below the bottom 'Ctrl' window was made to remain until it was dismissed by the user. As such, it required abandoning a 'Cap_nl_clreos' used when all the terminal rows had not been drawn. Instead each line had to be cleared individually until the row reserved for that 'Ctrl' window area had been reached. Unfortunately, while a 'Cap_nl_clreos' didn't create a problem for 'batch' mode, a 'Cap_clr_eol' used instead yielded an unending loop if those rows were limitless. So, now we will only clear that area when top isn't in 'batch' mode (which should have always been the case). Reference(s): . May, 2022 - bottom window made sticky commit ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, Signed-off-by: Jim Warner --- top/top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/top/top.c b/top/top.c index 1acd8a4d..142d5213 100644 --- a/top/top.c +++ b/top/top.c @@ -6948,7 +6948,7 @@ static void frame_make (void) { /* clear to end-of-screen - critical if last window is 'idleps off' (main loop must iterate such that we're always called before sleep) */ - if (scrlins < Max_lines) { + if (!Batch && scrlins < Max_lines) { for (i = scrlins + Msg_row + 1; i < SCREEN_ROWS; i++) { putp(tg2(0, i)); putp(Cap_clr_eol); -- 2.40.0