aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2016-07-22 21:34:54 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-28 17:32:24 +0200
commitab75d14d62a5d57b104ae8f77a489a74025c797f (patch)
tree63557d20d69da2c5820f5d789a20ec8b17ef1940
parentf86bb4d88ff1b7e1dd10eb51ac155948106902d5 (diff)
downloadmblaze-ab75d14d62a5d57b104ae8f77a489a74025c797f.tar.gz
mpick: fix new detection
-rw-r--r--mpick.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mpick.c b/mpick.c
index 0df64af..e3197d2 100644
--- a/mpick.c
+++ b/mpick.c
@@ -790,11 +790,11 @@ oneline(char *line, long idx)
*e-- = 0;
m.msg = blaze822(m.fpath);
- if (!m.msg) {
+ if (!m.msg)
return;
- }
- if (strstr(m.fpath, "/new/") != NULL)
+ if ((e = strrchr(m->fpath, '/') - 1) && (e - m->fpath) >= 2 &&
+ *e-- == 'w' && *e-- == 'e' && *e-- == 'n')
m.flags |= FLAG_NEW;
if (cur && strcmp(cur, m.fpath) == 0)