From 030b44feb295e73883da511034727e990e059c59 Mon Sep 17 00:00:00 2001 From: Steffen Nurpmeso Date: Thu, 29 Nov 2018 01:23:30 +0100 Subject: [PATCH] a_colour__show(): make it "turing-complete" --- colour.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/colour.c b/colour.c index c8d871cf..e53c49b6 100644 --- a/colour.c +++ b/colour.c @@ -458,9 +458,9 @@ jredo: continue; while(cmp != NULL){ - char const *tagann, *tag; + char const *tagcomm, *tag; - tagann = n_empty; + tagcomm = n_empty; if((tag = cmp->cm_tag) == NULL) tag = n_empty; else if(tag == n_COLOUR_TAG_SUM_DOT) @@ -468,15 +468,15 @@ jredo: else if(tag == n_COLOUR_TAG_SUM_OLDER) tag = "older"; #ifdef HAVE_REGEX - else if(cmp->cm_regex != NULL) - tagann = "[rx] "; + else if(cmp->cm_regex != NULL && (n_poption & n_PO_D_V)) + tagcomm = "# regex"; #endif fprintf(n_stdout, "colour %s %-*s %s %s%s\n", a_colour_types[ct], a_COLOUR_MAP_SHOW_FIELDWIDTH, savecat(a_colour_ctx_prefixes[i1], a_colour_map_ids[i1][i2].cmi_name), (char const*)cmp->cm_buf + cmp->cm_user_off, - tagann, n_shexp_quote_cp(tag, TRU1)); + n_shexp_quote_cp(tag, TRU1), tagcomm); cmp = cmp->cm_next; } } -- 2.11.4.GIT