From 29351db6a05e7e42be457569428425520a18beec Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Sat, 15 May 2010 21:06:58 -0300 Subject: [PATCH] perf newt: Exit browser unconditionally when CTRL+C, q or Q is pressed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ESC still asks for confirmation. Suggested-by: Ingo Molnar Cc: Frédéric Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Tom Zanussi LKML-Reference: Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/newt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index 094887f45d05..139eb1a16cd8 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c @@ -837,9 +837,10 @@ int hists__browse(struct hists *self, const char *helpline, const char *input_na if (es.reason == NEWT_EXIT_HOTKEY) { if (toupper(es.u.key) == 'A') goto do_annotate; - if (es.u.key == NEWT_KEY_ESCAPE || - toupper(es.u.key) == 'Q' || - es.u.key == CTRL('c')) { + if (toupper(es.u.key) == 'Q' || + es.u.key == CTRL('c')) + break; + if (es.u.key == NEWT_KEY_ESCAPE) { if (dialog_yesno("Do you really want to exit?")) break; else -- GitLab