top: extend '=' key to include active 'locate' request

It is documented behavior that when certain other keys
are active, sorts column highlighting will temporarily
be disabled. Among those keys is the 'L' (locate/find)
provision. The equals ('=') key can be used to restore
column highlighting by resetting other keys, except 1.

When a locate/find is active, the '=' key will have no
effect on 'x' column highlighting, which still remains
disabled. Further, when 'L' is active an 'x' keystroke
is processed changing the state of column highlighting
but without any visual clue (since it's yet disabled).

So this commit just extends the '=' key to embrace 'L'
processing resets, just like other highlight disabling
keys while avoiding 'x' state changes if approproiate.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2015-10-24 00:00:00 -05:00 committed by Craig Small
parent 489d23a132
commit 94e4749be3
2 changed files with 14 additions and 7 deletions

View File

@ -1019,10 +1019,11 @@ those \*(CIs applicable to \*(AM.
Removes restrictions on which tasks are shown.
This command will reverse any `i' (idle tasks) and `n' (max tasks)
commands that might be active.
It also provides for an exit from PID monitoring, User filtering
and Other filtering.
It also provides for an exit from PID monitoring, User filtering,
Other filtering and Locate processing.
See the `\-p' \*(CO for a discussion of PID monitoring, the `U' or `u'
\*(CIs for User filtering and the `O' or `o' \*(CIs for Other filtering.
\*(CIs for User filtering the `O' or `o' \*(CIs for Other filtering
and `L' or `&' \*(CIs for Locate processing.
Additionally, any window that has been scrolled will be reset with
this command.
@ -1631,8 +1632,8 @@ as the only display element.
.TP 7
*\ \ \fB=\fR | \fB+\fR\ \ :\fIEqualize-(reinitialize)-Window(s) \fR
The `=' key forces the \*(CW's \*(TD to be visible.
It also reverses any `i' (idle tasks), `n' (max tasks), `u/U' (user filter)
and `o/O' (other filter) commands that might be active.
It also reverses any `i' (idle tasks), `n' (max tasks), `u/U' (user filter),
\`o/O' (other filter) and 'L' (locate) commands that might be active.
Also, if the window had been scrolled, it will be reset with this command.
\*(XT 5c. SCROLLING a Window for additional information regarding vertical
and horizontal scrolling.
@ -1641,7 +1642,7 @@ The `+' key does the same for all windows.
The four \*(TDs will reappear, evenly balanced.
They will also have retained any customizations you had previously
applied, except for the `i' (idle tasks), `n' (max tasks), `u/U'
(user filter), `o/O' (other filter) and scrolling \*(CIs.
(user filter), `o/O' (other filter), `L' (locate) and scrolling \*(CIs.
.TP 7
*\ \ \fBA\fR\ \ :\fIAlternate-Display-Mode\fR toggle \fR

View File

@ -3852,6 +3852,11 @@ static void win_reset (WIN_t *q) {
#endif
Monpidsidx = 0;
osel_clear(q);
q->findstr[0] = '\0';
#ifndef USE_X_COLHDR
// NOHISEL_xxx is redundant (already turned off by osel_clear)
OFFw(q, NOHIFND_xxx | NOHISEL_xxx);
#endif
} // end: win_reset
@ -4654,7 +4659,8 @@ static void keys_task (int ch) {
TOGw(w, Show_HICOLS);
capsmk(w);
#else
if (ENUviz(w, w->rc.sortindx)) {
if (ENUviz(w, w->rc.sortindx)
&& !CHKw(w, NOHIFND_xxx | NOHISEL_xxx)) {
TOGw(w, Show_HICOLS);
if (ENUpos(w, w->rc.sortindx) < w->begpflg) {
if (CHKw(w, Show_HICOLS)) w->begpflg += 2;