top: fix unlikely edge case wherein all fields are off

While testing a newlib interface for pids acquisitions
I encountered some unexpected results if an idiot user
(me) turns off all displayable fields. So, this commit
ensures that the PID field will be shown as a minimum.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2015-08-03 00:00:00 -05:00 committed by Craig Small
parent b7fe46a815
commit 180bbb4032

View File

@ -2021,6 +2021,7 @@ static void calibrate_fields (void) {
#endif
}
}
if (!w->totpflgs) w->pflgsall[w->totpflgs++] = EU_PID;
/* build a preliminary columns header not to exceed screen width
while accounting for a possible leading window number */