Skip to content

Commit

Permalink
perf newt: Exit browser unconditionally when CTRL+C, q or Q is pressed
Browse files Browse the repository at this point in the history
ESC still asks for confirmation.

Suggested-by: Ingo Molnar <mingo@elte.hu>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Arnaldo Carvalho de Melo committed May 16, 2010
1 parent c1ec5fe commit 29351db
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/perf/util/newt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 29351db

Please sign in to comment.