From 619d4936ee227bbd68488eb1a48be5e74627ee34 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Wed, 15 Jun 2022 00:00:00 -0500 Subject: [PATCH] top: allow sticky 'Ctrl' bottom window code by #define <=== port of newlib 16e202d2 ______________________________ original newlib message After making that new bottom window more persistent, I decided to offer a build choice for somebody who might prefer to have the rug pulled out from under him while reviewing window contents should some target task end. If 'TAGGED_BRIEF' is defined old behavior is restored. [ it should be noted, however, that when this define ] [ is active we'll lose any benefit of onetime update ] [ for the bottom window. just like with the original ] [ behavior, it is repainted with every update cycle. ] Signed-off-by: Jim Warner --- top/top.c | 10 ++++++++++ top/top.h | 1 + 2 files changed, 11 insertions(+) diff --git a/top/top.c b/top/top.c index e85d020b..d6125004 100644 --- a/top/top.c +++ b/top/top.c @@ -4869,8 +4869,13 @@ static void wins_tag_cmdline (void) { putp(fmtmk("%s%s", tg2(0, SCREEN_ROWS + 1), Cap_clr_eos)); putp(fmtmk("%s%s", tg2(0, SCREEN_ROWS + 1), Cap_norm)); fputs(p, stdout); +#ifdef TAGGED_BRIEF + } else + TAGGED_TOSS; +#else } TAGGED_KEEP; +#endif } // end: wins_tag_cmdline @@ -4907,8 +4912,13 @@ static void wins_tag_generic (void) { putp(fmtmk("%s%s", tg2(0, SCREEN_ROWS + 1), Cap_clr_eos)); putp(fmtmk("%s%s", tg2(0, SCREEN_ROWS + 1), Cap_norm)); fputs(p, stdout); +#ifdef TAGGED_BRIEF + } else + TAGGED_TOSS; +#else } TAGGED_KEEP; +#endif } // end: wins_tag_generic diff --git a/top/top.h b/top/top.h index 3de0822d..a7a1caa8 100644 --- a/top/top.h +++ b/top/top.h @@ -61,6 +61,7 @@ //#define SCROLLVAR_NO /* disable intra-column horizontal scrolls */ //#define SCROLLV_BY_1 /* when scrolling left/right do not move 8 */ //#define STRINGCASENO /* case insenstive compare/locate versions */ +//#define TAGGED_BRIEF /* zap Ctrl bottom window when target dies */ //#define TERMIOS_ONLY /* use native input only (just limp along) */ //#define TOG4_NOFORCE /* no force 2 abreast mode with '4' toggle */ //#define TOG4_NOTRUNC /* ensure no truncation for 2 abreast mode */