perf ui browser: Return the exit key in all browsers
Make all browsers return the exit key uniformly and remove the newtExitStruct parameter, removing one more newt specific thing from the ui API. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
8f9bbc408b
commit
b50e003db1
7 changed files with 93 additions and 125 deletions
|
|
@ -321,7 +321,7 @@ static int hist_entry__tty_annotate(struct hist_entry *he)
|
|||
|
||||
static void hists__find_annotations(struct hists *self)
|
||||
{
|
||||
struct rb_node *first = rb_first(&self->entries), *nd = first;
|
||||
struct rb_node *nd = rb_first(&self->entries), *next;
|
||||
int key = KEY_RIGHT;
|
||||
|
||||
while (nd) {
|
||||
|
|
@ -343,20 +343,19 @@ find_next:
|
|||
|
||||
if (use_browser > 0) {
|
||||
key = hist_entry__tui_annotate(he);
|
||||
if (is_exit_key(key))
|
||||
break;
|
||||
switch (key) {
|
||||
case KEY_RIGHT:
|
||||
case '\t':
|
||||
nd = rb_next(nd);
|
||||
next = rb_next(nd);
|
||||
break;
|
||||
case KEY_LEFT:
|
||||
if (nd == first)
|
||||
continue;
|
||||
nd = rb_prev(nd);
|
||||
default:
|
||||
next = rb_prev(nd);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
if (next != NULL)
|
||||
nd = next;
|
||||
} else {
|
||||
hist_entry__tty_annotate(he);
|
||||
nd = rb_next(nd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue