Don't refresh in filter mode

This commit is contained in:
Arun Prakash Jana 2019-03-13 02:52:50 +05:30
parent a747a1e267
commit ffc4b7e55d
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -581,6 +581,7 @@ static inline void printmsg(const char *msg)
static void printwait(const char *msg, int *presel) static void printwait(const char *msg, int *presel)
{ {
printmsg(msg); printmsg(msg);
if (presel)
*presel = MSGWAIT; *presel = MSGWAIT;
} }
@ -1473,13 +1474,17 @@ static int nextsel(int presel)
#endif #endif
c = presel; c = presel;
if (c == 0 || c == '$') { if (c == 0 || c == MSGWAIT) {
c = getch(); c = getch();
DPRINTF_D(c); DPRINTF_D(c);
if (presel == '$') if (presel == MSGWAIT) {
if (cfg.filtermode)
c = FILTER;
else
c = CONTROL('L'); c = CONTROL('L');
} }
}
if (c == -1) { if (c == -1) {
++idle; ++idle;
@ -3261,7 +3266,7 @@ nochange:
case SEL_DETAIL: case SEL_DETAIL:
cfg.showdetail ^= 1; cfg.showdetail ^= 1;
cfg.showdetail ? (printptr = &printent_long) : (printptr = &printent); cfg.showdetail ? (printptr = &printent_long) : (printptr = &printent);
break; continue;
case SEL_FSIZE: case SEL_FSIZE:
cfg.sizeorder ^= 1; cfg.sizeorder ^= 1;
cfg.mtimeorder = 0; cfg.mtimeorder = 0;
@ -3467,8 +3472,9 @@ nochange:
g_crc = crc8fast((uchar *)dents, ndents * sizeof(struct entry)); g_crc = crc8fast((uchar *)dents, ndents * sizeof(struct entry));
copystartid = cur; copystartid = cur;
ncp = 0; ncp = 0;
printwait("selection on", &presel); mvprintw(xlines - 1, 0, "selection on");
goto nochange; getch();
continue;
} }
if (!ncp) { /* Handle range selection */ if (!ncp) { /* Handle range selection */
@ -3504,10 +3510,9 @@ nochange:
dents[r].flags |= FILE_COPIED; dents[r].flags |= FILE_COPIED;
} }
mvprintw(xlines - 1, 0, "%d files selected\n", ncp = copyendid - copystartid + 1;
copyendid - copystartid + 1); mvprintw(xlines - 1, 0, "%d files selected\n", ncp);
getch(); getch();
continue; /* delayed message shown, now redraw */
} }
if (copybufpos) { /* File path(s) written to the buffer */ if (copybufpos) { /* File path(s) written to the buffer */
@ -3518,11 +3523,12 @@ nochange:
if (ncp) { /* Some files cherry picked */ if (ncp) { /* Some files cherry picked */
mvprintw(xlines - 1, 0, "%d files selected\n", ncp); mvprintw(xlines - 1, 0, "%d files selected\n", ncp);
getch(); getch();
continue; /* delayed message shown, now redraw */
} }
} else } else {
printwait("selection off", &presel); printwait("selection off", &presel);
goto nochange; goto nochange;
}
continue;
case SEL_COPYLIST: case SEL_COPYLIST:
if (copybufpos) { if (copybufpos) {
showcplist(); showcplist();