public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf top: do not exit tui on tab key with single event
@ 2011-10-19 17:37 David Ahern
  0 siblings, 0 replies; only message in thread
From: David Ahern @ 2011-10-19 17:37 UTC (permalink / raw)
  To: acme, linux-kernel; +Cc: mingo, peterz, fweisbec, David Ahern

TUI help states for multiple event sessions the TAB/UNTAB keys are
used to switch events. For single event sessions (e.g., the default)
the tab key currently causes the tui to exit. Change that to do
nothing since there is not no second event to switch to.

Signed-off-by: David Ahern <dsahern@gmail.com>
---
 tools/perf/util/ui/browsers/hists.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c
index 936e641..78ae9b8 100644
--- a/tools/perf/util/ui/browsers/hists.c
+++ b/tools/perf/util/ui/browsers/hists.c
@@ -868,6 +868,8 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 		switch (key) {
 		case NEWT_KEY_TAB:
 		case NEWT_KEY_UNTAB:
+			if (nr_events == 1)
+				continue;
 			/*
 			 * Exit the browser, let hists__browser_tree
 			 * go to the next or previous
-- 
1.7.6.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-19 17:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-19 17:37 [PATCH] perf top: do not exit tui on tab key with single event David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox