From: Jim Warner Date: Wed, 29 Feb 2012 06:00:00 +0000 (-0600) Subject: top: fix a regression associated with USE_X_COLHDR X-Git-Tag: v3.3.3~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=488aa10d33de555f8adebed500832846d5906ab6;p=procps-ng top: fix a regression associated with USE_X_COLHDR 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 --- diff --git a/top/top.c b/top/top.c index c448a642..5f6a3a37 100644 --- 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 : ""