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 8226ca9838
commit 3da298c1d6

View File

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