aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-07-15 06:21:07 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-07-17 14:44:43 -0400
commit63f20e744a595444f7ab1d47a29c5b74830feb47 (patch)
tree7d57393b56b9371e3e664e815a81a0fb77f64fb4 /tools
parent31a05a4127c81d5d7f095c609420bf6df892a8b0 (diff)
perf ui: Make END go to the last entry, not the top of the last page
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/newt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index 06f248fde5cf..932f12468c3c 100644
--- a/tools/perf/util/newt.c
+++ b/tools/perf/util/newt.c
@@ -491,11 +491,11 @@ static int ui_browser__run(struct ui_browser *self, struct newtExitStruct *es)
491 break; 491 break;
492 case NEWT_KEY_END: 492 case NEWT_KEY_END:
493 offset = self->height - 1; 493 offset = self->height - 1;
494 if (offset >= self->nr_entries)
495 offset = self->nr_entries - 1;
494 496
495 if (offset > self->nr_entries) 497 self->index = self->nr_entries - 1;
496 offset = self->nr_entries; 498 self->first_visible_entry_idx = self->index - offset;
497
498 self->index = self->first_visible_entry_idx = self->nr_entries - 1 - offset;
499 self->seek(self, -offset, SEEK_END); 499 self->seek(self, -offset, SEEK_END);
500 break; 500 break;
501 case NEWT_KEY_RIGHT: 501 case NEWT_KEY_RIGHT: