aboutsummaryrefslogtreecommitdiffstats
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 {
1066void setup_browser(void) 1066void setup_browser(void)
1067{ 1067{
1068 struct newtPercentTreeColors *c = &defaultPercentTreeColors; 1068 struct newtPercentTreeColors *c = &defaultPercentTreeColors;
1069 if (!isatty(1)) 1069
1070 if (!isatty(1) || !use_browser) {
1071 setup_pager();
1070 return; 1072 return;
1073 }
1071 1074
1072 use_browser = true; 1075 use_browser = 1;
1073 newtInit(); 1076 newtInit();
1074 newtCls(); 1077 newtCls();
1075 ui_helpline__puts(" "); 1078 ui_helpline__puts(" ");
@@ -1082,7 +1085,7 @@ void setup_browser(void)
1082 1085
1083void exit_browser(bool wait_for_ok) 1086void exit_browser(bool wait_for_ok)
1084{ 1087{
1085 if (use_browser) { 1088 if (use_browser > 0) {
1086 if (wait_for_ok) { 1089 if (wait_for_ok) {
1087 char title[] = "Fatal Error", ok[] = "Ok"; 1090 char title[] = "Fatal Error", ok[] = "Ok";
1088 newtWinMessage(title, ok, browser__last_msg); 1091 newtWinMessage(title, ok, browser__last_msg);