]> granicus.if.org Git - procps-ng/commitdiff
top: a tweak to the recent 256-color termninal support
authorJim Warner <james.warner@comcast.net>
Thu, 7 Jun 2018 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Wed, 13 Jun 2018 12:11:29 +0000 (22:11 +1000)
We now use the actual terminfo 'max_colors' value with
the 'color mapping' screen, not that hard coded '256'.

Reference(s):
https://gitlab.com/procps-ng/procps/issues/96
. introduced 256 color support
commit cf057d2fe50c1c7e0e2c11f4e03e0be3ac2f9457

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

index df83e8d15ab21cee29deb91eee9e3e0c56997119..f4898de93e71187587bcc8e5be13ddf1ba3851ce 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -4353,7 +4353,7 @@ signify_that:
          , CHKw(w, View_NOBOLD) ? N_txt(ON_word_only_txt) : N_txt(OFF_one_word_txt)
          , CHKw(w, Show_COLORS) ? N_txt(ON_word_only_txt) : N_txt(OFF_one_word_txt)
          , CHKw(w, Show_HIBOLD) ? N_txt(ON_word_only_txt) : N_txt(OFF_one_word_txt)
-         , tgt, clr, w->grpname));
+         , tgt, max_colors, clr, w->grpname));
       putp(Cap_clr_eos);
       fflush(stdout);
 
index be6565b7ab3212acf04d58ba6adbcf9c3d1fdafd..6bf6fea89832645fb1bb50f39f44d9ba5083810b 100644 (file)
@@ -627,7 +627,7 @@ static void build_uniq_nlstab (void) {
       "   S~2 = Summary Data,~1  M~2 = Messages/Prompts,\n"
       "   H~2 = Column Heads,~1  T~2 = Task Information\n"
       "2) Select a ~1color~2 as a number or use the up/down arrow keys\n"
-      "   to raise/lower the 256 colors value, ~1current color~2 is ~1 %d ~4:\n"
+      "   to raise/lower the %d colors value, ~1current color~2 is ~1 %d ~4:\n"
       "   0~2 = black,~1  1~2 = red,    ~1  2~2 = green,~1  3~2 = yellow,\n"
       "   4~2 = blue, ~1  5~2 = magenta,~1  6~2 = cyan, ~1  7~2 = white\n"
       "\n"