]> granicus.if.org Git - procps-ng/commitdiff
top: fix a regression associated with USE_X_COLHDR
authorJim Warner <james.warner@comcast.net>
Wed, 29 Feb 2012 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@enc.com.au>
Fri, 2 Mar 2012 10:29:26 +0000 (21:29 +1100)
When sort column header emphasis was extended to a
monochrome screen, the ability to emphasize selections
on the Fields Management screen was lost when colors
were not being displayed.

This patch corrects that bug by using the capclr_hdr
terminfo string instead of capclr_msg.

Reference:
commit 0c6aa6af4190be60853acced8023470c3d1910c1

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

index c448a6423f8feb5c0c0069a75b1f58d3adef49b9..5f6a3a375553fc7ac61500da0f00c5474a65da8a 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -1597,7 +1597,7 @@ static void display_fields (int focus, int extend) {
       char sbuf[xSUFX+1];
       int b = FLDviz(w, i);
       FLG_t f = FLDget(w, i);
-      const char *h, *e = (i == focus && extend) ? w->capclr_msg : "";
+      const char *h, *e = (i == focus && extend) ? w->capclr_hdr : "";
 
       // advance past leading header spaces and prep sacrificial suffix
       for (h = Fieldstab[f].head; ' ' == *h; ++h) ;
@@ -1608,7 +1608,7 @@ static void display_fields (int focus, int extend) {
          , b ? '*' : ' '
          , b ? w->cap_bold : Cap_norm
          , e
-         , i == focus ? w->capclr_msg : ""
+         , i == focus ? w->capclr_hdr : ""
          , h
          , Cap_norm
          , b ? w->cap_bold : ""