This patch will eliminate a bug which is unique to our
newlib branch. It's extremely rare and only happens if
a search ('L'/'&') is initiated during the period when
fields are currently being auto-sized (AUTOX_MODE on).
This bug surfaces as either all zero results for tasks
displayed or a segmentation fault, depending upon what
fields were activated. It is caused by the timing of a
call to the <pids> 'reset' function. When called after
a task refresh, but before do_key(), this bug appears.
So this patch just ensures that 'reset' will be called
after do_key() & before the tasks have been refreshed.
Signed-off-by: Jim Warner <james.warner@comcast.net>
Autox_found = 1;
}
}
- if (Autox_found) calibrate_fields();
+ // trigger a call to calibrate_fields (via zap_fieldstab)
+ if (Autox_found) Frames_signal = BREAK_autox;
} // end: widths_resize
WIN_t *w = Curwin; // avoid gcc bloat with a local copy
int i, scrlins;
+ // check auto-sized width increases from the last iteration...
+ if (AUTOX_MODE && Autox_found)
+ widths_resize();
+
// deal with potential signal(s) since the last time around...
if (Frames_signal)
zap_fieldstab();
/* we'll deem any terminal not supporting tgoto as dumb and disable
the normal non-interactive output optimization... */
if (!Cap_can_goto) PSU_CLREOS(0);
-
- /* lastly, check auto-sized width needs for the next iteration */
- if (AUTOX_MODE && Autox_found)
- widths_resize();
} // end: frame_make
/* Used to manipulate (and document) the Frames_signal states */
enum resize_states {
- BREAK_off = 0, BREAK_kbd, BREAK_sig
+ BREAK_off = 0, BREAK_kbd, BREAK_sig, BREAK_autox
};
/* This typedef just ensures consistent 'process flags' handling */