mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
We don't want to exit the typing mode because of an error
Delay displaying the message until return is pressed. Also contain all printwarn() calls inside browse().
This commit is contained in:
parent
0152d36351
commit
4db0d0dae0
8
noice.c
8
noice.c
|
@ -578,10 +578,8 @@ populate(void)
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
/* Can fail when permissions change while browsing */
|
/* Can fail when permissions change while browsing */
|
||||||
if (canopendir(path) == 0) {
|
if (canopendir(path) == 0)
|
||||||
printwarn();
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
/* Search filter */
|
/* Search filter */
|
||||||
r = setfilter(&re, fltr);
|
r = setfilter(&re, fltr);
|
||||||
|
@ -666,9 +664,11 @@ begin:
|
||||||
/* Path and filter should be malloc(3)-ed strings at all times */
|
/* Path and filter should be malloc(3)-ed strings at all times */
|
||||||
r = populate();
|
r = populate();
|
||||||
if (r == -1) {
|
if (r == -1) {
|
||||||
nowtyping = 0;
|
if (!nowtyping) {
|
||||||
|
printwarn();
|
||||||
goto nochange;
|
goto nochange;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
redraw();
|
redraw();
|
||||||
|
|
Loading…
Reference in a new issue