aboutsummaryrefslogtreecommitdiffstats
path: root/noice.c
diff options
context:
space:
mode:
authorlostd <lostd@2f30.org>2015-07-02 22:51:58 +0100
committerlostd <lostd@2f30.org>2015-07-02 22:51:58 +0100
commit4db0d0dae08090f1bdf7b9a629777ba09e222667 (patch)
treeb96318d505c0aac97535796db198be3f20d01509 /noice.c
parent0152d363515a774111bc08182873566ffb079db4 (diff)
downloadnoice-4db0d0dae08090f1bdf7b9a629777ba09e222667.tar.gz
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().
Diffstat (limited to 'noice.c')
-rw-r--r--noice.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/noice.c b/noice.c
index 8fe0943..2c408fe 100644
--- a/noice.c
+++ b/noice.c
@@ -578,10 +578,8 @@ populate(void)
int r;
/* Can fail when permissions change while browsing */
- if (canopendir(path) == 0) {
- printwarn();
+ if (canopendir(path) == 0)
return -1;
- }
/* Search filter */
r = setfilter(&re, fltr);
@@ -666,8 +664,10 @@ begin:
/* Path and filter should be malloc(3)-ed strings at all times */
r = populate();
if (r == -1) {
- nowtyping = 0;
- goto nochange;
+ if (!nowtyping) {
+ printwarn();
+ goto nochange;
+ }
}
for (;;) {
Un proyecto texto-plano.xyz