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-09 00:00:00 -05:00
committed by Craig Small
parent d7791607ad
commit 657ac2e0c7
2 changed files with 15 additions and 8 deletions

View File

@ -3462,8 +3462,13 @@ static void win_reset (WIN_t *q) {
#else
q->rc.maxtasks = q->usrseltyp = q->begpflg = q->begtask = 0;
#endif
osel_clear(q);
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
@ -4292,7 +4297,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;