summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/newt.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/newt.c')
-rw-r--r--tools/perf/util/newt.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index 9338d060ee49..9d203c972f3b 100644
--- a/tools/perf/util/newt.c
+++ b/tools/perf/util/newt.c
@@ -1066,10 +1066,13 @@ static struct newtPercentTreeColors {
void setup_browser(void)
{
struct newtPercentTreeColors *c = &defaultPercentTreeColors;
- if (!isatty(1))
+
+ if (!isatty(1) || !use_browser) {
+ setup_pager();
return;
+ }
- use_browser = true;
+ use_browser = 1;
newtInit();
newtCls();
ui_helpline__puts(" ");
@@ -1082,7 +1085,7 @@ void setup_browser(void)
void exit_browser(bool wait_for_ok)
{
- if (use_browser) {
+ if (use_browser > 0) {
if (wait_for_ok) {
char title[] = "Fatal Error", ok[] = "Ok";
newtWinMessage(title, ok, browser__last_msg);