[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-63f20e744a595444f7ab1d47a29c5b74830feb47@git.kernel.org>
Date: Sun, 18 Jul 2010 10:33:44 GMT
From: tip-bot for Arnaldo Carvalho de Melo <acme@...hat.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, eranian@...gle.com, acme@...hat.com,
hpa@...or.com, mingo@...hat.com, peterz@...radead.org,
efault@....de, fweisbec@...il.com, tglx@...utronix.de
Subject: [tip:perf/core] perf ui: Make END go to the last entry, not the top of the last page
Commit-ID: 63f20e744a595444f7ab1d47a29c5b74830feb47
Gitweb: http://git.kernel.org/tip/63f20e744a595444f7ab1d47a29c5b74830feb47
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Thu, 15 Jul 2010 07:21:07 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Sat, 17 Jul 2010 15:44:43 -0300
perf ui: Make END go to the last entry, not the top of the last page
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Mike Galbraith <efault@....de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/newt.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index 06f248f..932f124 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)
break;
case NEWT_KEY_END:
offset = self->height - 1;
+ if (offset >= self->nr_entries)
+ offset = self->nr_entries - 1;
- if (offset > self->nr_entries)
- offset = self->nr_entries;
-
- self->index = self->first_visible_entry_idx = self->nr_entries - 1 - offset;
+ self->index = self->nr_entries - 1;
+ self->first_visible_entry_idx = self->index - offset;
self->seek(self, -offset, SEEK_END);
break;
case NEWT_KEY_RIGHT:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists