From 15ff6b643fa8bb264cd7081efca2108ae8be04d1 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Tue, 20 Aug 2013 11:19:42 +1000 Subject: [PATCH] Browse: suppress "last-key" debugging. Only display this if a suitable DEBUG envionment variable is set. Signed-off-by: NeilBrown --- vpatch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.39.5