]> granicus.if.org Git - procps-ng/commitdiff
top: restore tab highlight for ^L and ^P bottom window
authorJim Warner <james.warner@comcast.net>
Mon, 23 Jan 2023 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@dropbear.xyz>
Tue, 24 Jan 2023 01:15:19 +0000 (12:15 +1100)
With the commit shown below a BOT_PRESENT constant was
introduced. Unfortunately it was defined in a way that
disable ^L (message log) and ^P (namespaces) highlight
when using the tab key. This patch fixes such an oops.

Reference(s):
. Jan, 2023 - lessen 'bottom window' overhead
commit 28f44729dab9b292a9d5499f8cad6a12c1eb4ae5

Signed-off-by: Jim Warner <james.warner@comcast.net>
src/top/top.c

index 6cade5eff06aba3ef551559d5fe33ab9799ab5d0..ec132e666febd2f13a89fab4dbbd2d80d43d58a0 100644 (file)
@@ -105,7 +105,7 @@ static int   Screen_cols, Screen_rows, Max_lines;
         /* These 'SCREEN_ROWS', 'BOT_ and 'Bot_' guys are used
            in managing the special separate bottom 'window' ... */
 #define      SCREEN_ROWS ( Screen_rows - Bot_rsvd )
-#define      BOT_PRESENT ( Bot_what > 0 )
+#define      BOT_PRESENT ( Bot_what != 0 )
 #define      BOT_ITEMMAX  10           // Bot_item array's max size
 #define      BOT_MSGSMAX  10           // total entries for Msg_tab
 #define      BOT_UNFOCUS  -1           // tab focus not established