perf newt: Exit browser unconditionally when CTRL+C, q or Q is pressed

ESC still asks for confirmation.
Suggested-by: NIngo 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: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 c1ec5fef
...@@ -837,9 +837,10 @@ int hists__browse(struct hists *self, const char *helpline, const char *input_na ...@@ -837,9 +837,10 @@ int hists__browse(struct hists *self, const char *helpline, const char *input_na
if (es.reason == NEWT_EXIT_HOTKEY) { if (es.reason == NEWT_EXIT_HOTKEY) {
if (toupper(es.u.key) == 'A') if (toupper(es.u.key) == 'A')
goto do_annotate; goto do_annotate;
if (es.u.key == NEWT_KEY_ESCAPE || if (toupper(es.u.key) == 'Q' ||
toupper(es.u.key) == 'Q' || es.u.key == CTRL('c'))
es.u.key == CTRL('c')) { break;
if (es.u.key == NEWT_KEY_ESCAPE) {
if (dialog_yesno("Do you really want to exit?")) if (dialog_yesno("Do you really want to exit?"))
break; break;
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册