linux/tools/perf/ui
Wang Nan 979d2cac11 perf hists browser: Reset selection when refresh
With the following steps:

 Step 1: perf report

 Step 2: Use UP/DOWN to select an entry, don't press 'ENTER'

 Step 3: Use '/' to filter symbols, use a filter which returns
         empty result

 Step 4: Press 'ENTER'

We see that, even if we have filtered all the symbols (and the main
interface is empty), pressing 'ENTER' still selects one symbol. This
behavior surprises the user.

This patch resets browser->{he_,}selection in hist_browser__refresh()
and lets it choose default selection. In this case
browser->{he_,}selection keeps NULL so user won't see annotation item in
menu.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1449455746-41952-4-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-12-07 12:02:12 -03:00
..
browsers perf hists browser: Reset selection when refresh 2015-12-07 12:02:12 -03:00
gtk perf build: Add gtk objects building 2015-02-12 11:49:12 -03:00
stdio perf callchain: Use a common function to resolve symbol or name 2014-11-19 12:33:47 -03:00
tui perf ui tui: Register the error callbacks before initializing the widgets 2015-10-22 16:44:17 -03:00
browser.c perf ui browser: Optional horizontal scrolling key binding 2015-10-05 17:59:49 -03:00
browser.h perf ui browser: Optional horizontal scrolling key binding 2015-10-05 17:59:49 -03:00
Build perf build: Add slang objects building 2015-02-12 11:48:13 -03:00
helpline.c perf ui/helpline: Introduce ui_helpline__vshow() 2012-12-09 08:46:04 -03:00
helpline.h perf ui/helpline: Introduce ui_helpline__vshow() 2012-12-09 08:46:04 -03:00
hist.c perf tools: Use hpp_dimension__add_output to register hpp columns 2015-10-06 18:04:59 -03:00
keysyms.h perf hists browser: Add option for runtime switching perf data file 2013-02-06 18:09:24 -03:00
libslang.h perf ui browser: Introduce ui_browser__printf() 2015-08-12 10:27:05 -03:00
progress.c perf ui progress: Per progress bar state 2013-10-23 15:40:38 -03:00
progress.h perf tools: Remove EOL whitespaces 2015-01-21 13:24:31 -03:00
setup.c perf tools: Call perf_hpp__init() before setting up GUI browsers 2014-05-21 11:45:35 +02:00
ui.h perf tools: Separate out GTK codes to libperf-gtk.so 2013-10-09 15:55:25 -03:00
util.c perf evsel: Introduce perf_evsel__open_strerror method 2013-01-24 16:40:09 -03:00
util.h perf ui: Introduce struct perf_error_ops 2012-06-19 13:06:18 -03:00