diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-07-15 06:24:30 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-07-17 14:44:57 -0400 |
commit | b66ecd97c1866f9a869643a5b69a984d5ce8f8f1 (patch) | |
tree | fb2a82cb4e1131b590b892197168d11336ba6fc6 /tools | |
parent | 63f20e744a595444f7ab1d47a29c5b74830feb47 (diff) |
perf ui: Make ui_browser__run exit on unhandled hot keys
Right now ENTER doesn't always exits the newt tree widget, as it is used
for expanding/collapsing branches, but with the new tree widget being
developed we need to regain control to handle it, expanding/collapsing
branches.
In fact its really up to the ui_browser user to state what extra keys
should stop ui_browser__run, and it should handle just the ones needed
for basic browsing.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/newt.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index 932f12468c3c..7979003adeaf 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c | |||
@@ -498,12 +498,8 @@ static int ui_browser__run(struct ui_browser *self, struct newtExitStruct *es) | |||
498 | self->first_visible_entry_idx = self->index - offset; | 498 | self->first_visible_entry_idx = self->index - offset; |
499 | self->seek(self, -offset, SEEK_END); | 499 | self->seek(self, -offset, SEEK_END); |
500 | break; | 500 | break; |
501 | case NEWT_KEY_RIGHT: | ||
502 | case NEWT_KEY_LEFT: | ||
503 | case NEWT_KEY_TAB: | ||
504 | return es->u.key; | ||
505 | default: | 501 | default: |
506 | continue; | 502 | return es->u.key; |
507 | } | 503 | } |
508 | if (ui_browser__refresh_entries(self) < 0) | 504 | if (ui_browser__refresh_entries(self) < 0) |
509 | return -1; | 505 | return -1; |