From: NeilBrown Date: Tue, 20 Aug 2013 01:19:42 +0000 (+1000) Subject: Browse: suppress "last-key" debugging. X-Git-Tag: v1.0~33 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=15ff6b643fa8bb264cd7081efca2108ae8be04d1;p=wiggle.git Browse: suppress "last-key" debugging. Only display this if a suitable DEBUG envionment variable is set. Signed-off-by: NeilBrown --- diff --git a/vpatch.c b/vpatch.c index 7b5c16d..e78453e 100644 --- a/vpatch.c +++ b/vpatch.c @@ -2582,6 +2582,10 @@ static void main_window(struct plist *pl, int *np, FILE *f, int reverse, int any; /* count of files that have been save*/ int ans; MEVENT mevent; + char *debug = getenv("WIGGLE_DEBUG"); + + if (debug && !*debug) + debug = NULL; freopen("/dev/null","w",stderr); term_init(1); @@ -2640,7 +2644,7 @@ static void main_window(struct plist *pl, int *np, FILE *f, int reverse, move(0, cols - last_mesg_len); addstr(mesg); mesg = NULL; - } else { + } else if (debug) { /* debugging help: report last keystroke */ char bb[30]; sprintf(bb, "last-key = 0%o", c);