aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-08-16 09:43:54 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-08-16 09:43:54 -0400
commite91846213241e3c46da8cbe992bceb1697de8d78 (patch)
treef89db39cefbde906302277d4ddede765ff3828ac /tools
parentda5cabf80e2433131bf0ed8993abc0f7ea618c73 (diff)
perf annotate tui: Fix exit and RIGHT keys handling
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/ui/browsers/annotate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/ui/browsers/annotate.c b/tools/perf/util/ui/browsers/annotate.c
index 55ff792459ac..a90273e63f4f 100644
--- a/tools/perf/util/ui/browsers/annotate.c
+++ b/tools/perf/util/ui/browsers/annotate.c
@@ -146,6 +146,7 @@ static int annotate_browser__run(struct annotate_browser *self,
146 return -1; 146 return -1;
147 147
148 newtFormAddHotKey(self->b.form, NEWT_KEY_LEFT); 148 newtFormAddHotKey(self->b.form, NEWT_KEY_LEFT);
149 newtFormAddHotKey(self->b.form, NEWT_KEY_RIGHT);
149 150
150 nd = self->curr_hot; 151 nd = self->curr_hot;
151 if (nd) { 152 if (nd) {
@@ -178,7 +179,7 @@ static int annotate_browser__run(struct annotate_browser *self,
178 } 179 }
179out: 180out:
180 ui_browser__hide(&self->b); 181 ui_browser__hide(&self->b);
181 return 0; 182 return es->u.key;
182} 183}
183 184
184int hist_entry__tui_annotate(struct hist_entry *self) 185int hist_entry__tui_annotate(struct hist_entry *self)