perf newt: Make <- exit the ui_browser

Right now that means that pressing the left arrow willl make the symbol
annotation window to exit back to the main symbol histogram browser.

This is another improvement on the UI fastpath, i.e. just the arrows and
enter are enough for most browsing.
Suggested-by: default avatarIngo 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 7ebaa283
...@@ -323,6 +323,7 @@ static int ui_browser__run(struct ui_browser *self, const char *title, ...@@ -323,6 +323,7 @@ static int ui_browser__run(struct ui_browser *self, const char *title,
newtFormAddHotKey(self->form, NEWT_KEY_PGDN); newtFormAddHotKey(self->form, NEWT_KEY_PGDN);
newtFormAddHotKey(self->form, NEWT_KEY_HOME); newtFormAddHotKey(self->form, NEWT_KEY_HOME);
newtFormAddHotKey(self->form, NEWT_KEY_END); newtFormAddHotKey(self->form, NEWT_KEY_END);
newtFormAddHotKey(self->form, NEWT_KEY_LEFT);
if (ui_browser__refresh_entries(self) < 0) if (ui_browser__refresh_entries(self) < 0)
return -1; return -1;
...@@ -408,6 +409,7 @@ static int ui_browser__run(struct ui_browser *self, const char *title, ...@@ -408,6 +409,7 @@ static int ui_browser__run(struct ui_browser *self, const char *title,
} }
break; break;
case NEWT_KEY_ESCAPE: case NEWT_KEY_ESCAPE:
case NEWT_KEY_LEFT:
case CTRL('c'): case CTRL('c'):
case 'Q': case 'Q':
case 'q': case 'q':
...@@ -616,7 +618,7 @@ static void hist_entry__annotate_browser(struct hist_entry *self) ...@@ -616,7 +618,7 @@ static void hist_entry__annotate_browser(struct hist_entry *self)
if (hist_entry__annotate(self, &head) < 0) if (hist_entry__annotate(self, &head) < 0)
return; return;
ui_helpline__push("Press ESC to exit"); ui_helpline__push("Press <- or ESC to exit");
memset(&browser, 0, sizeof(browser)); memset(&browser, 0, sizeof(browser));
browser.entries = &head; browser.entries = &head;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment