Skip to contentSkip to conversation

perf top: do not exit tui on tab key with single event

PATCH New David Ahern 1 participant 1 message Oct 19, 2011 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf top: do not exit tui on tab key with single event

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.

---
 tools/perf/util/ui/browsers/hists.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
tools/perf/util/ui/browsers/hists.c +2 -0
index 936e641..78ae9b8 100644
@@ -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
Signature · 1 line
1.7.6.4