Skip to content

Commit

Permalink
perf annotate tui: Fix exit and RIGHT keys handling
Browse files Browse the repository at this point in the history
As part of ongoing effort to reduce the coupling with libnewt, browsers
are being changed to return the exit key.

The annotate browser is not returning it as expected by builtin-annotate
when annotating multiple symbols (when 'perf annotate' is called without
specifying a symbol name).

Fix it by returning the exit key and also adding the RIGHT key as a exit
key so that going to the next symbol in the TUI can work again.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Arnaldo Carvalho de Melo committed Aug 16, 2010
1 parent da5cabf commit e918462
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/perf/util/ui/browsers/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ static int annotate_browser__run(struct annotate_browser *self,
return -1;

newtFormAddHotKey(self->b.form, NEWT_KEY_LEFT);
newtFormAddHotKey(self->b.form, NEWT_KEY_RIGHT);

nd = self->curr_hot;
if (nd) {
Expand Down Expand Up @@ -178,7 +179,7 @@ static int annotate_browser__run(struct annotate_browser *self,
}
out:
ui_browser__hide(&self->b);
return 0;
return es->u.key;
}

int hist_entry__tui_annotate(struct hist_entry *self)
Expand Down

0 comments on commit e918462

Please sign in to comment.