kernel-ark/tools/perf/util/ui
Arnaldo Carvalho de Melo 18eaf0b8e6 perf hists browser: Fix handling of TAB/UNTAB for multiple events
When using multiple events the 'top' and 'report' tools will first
present the user with a menu to choose the event to browse.

After that the user can either press <- to go back to the menu and
choose another event or instead press TAB to go the next event without
having to go back to the menu or shift-TAB (UNTAB) to go the previous
event, useful to quickly visually see if multiple events are correlated.

The handling of each hists browser return was broken by the ed7e566,
that combined both switches, the first that was for choosing the event
and the second that was for checking if switching to the next event
without passing thru the events menu.

Repeat with me: Don't be clever like that.

Fix it by moving the switch to right after the call to the hists
browser, making abundantly clear that the two switches are unrelated.

This also fixes a compiler warning about the 'pos' variable being
possibly used unitialized.

Reported-by: Ingo Molnar <mingo@elte.hu>
[ committer note: the line above is for the compiler warning ]
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-ujxkbvj9vy8w6xe2op5m51tb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2011-10-13 12:22:28 -03:00
..
browsers perf hists browser: Fix handling of TAB/UNTAB for multiple events 2011-10-13 12:22:28 -03:00
browser.c perf ui browser: Remove ui_browser__add_exit_keys 2011-10-13 08:53:18 -03:00
browser.h perf ui browser: Remove ui_browser__add_exit_keys 2011-10-13 08:53:18 -03:00
helpline.c perf ui: Serialize screen updates 2011-02-16 14:47:55 -02:00
helpline.h perf ui browser: Handle SIGWINCH 2011-10-13 08:52:46 -03:00
libslang.h perf top: Fix TUI compilation 2011-02-01 17:33:06 -02:00
progress.c perf ui: Move ui_progress routines to separate file in util/ui/ 2010-08-10 16:09:14 -03:00
progress.h perf ui: Move ui_progress routines to separate file in util/ui/ 2010-08-10 16:09:14 -03:00
setup.c perf ui: Serialize screen updates 2011-02-16 14:47:55 -02:00
ui.h perf ui: Serialize screen updates 2011-02-16 14:47:55 -02:00
util.c perf tui: Make ui__warning modal 2011-03-01 10:24:43 -03:00
util.h perf ui: Complete the breakdown of util/newt.c 2010-08-10 16:11:38 -03:00