From: Arun Prakash Jana Date: Thu, 15 Jul 2021 20:24:15 +0000 (+0530) Subject: Do not apply filter if directory is empty X-Git-Tag: v4.2~20 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=d40dbfd69ab074ae4ff4815ceacb8d437b6f6b84;p=nnn.git Do not apply filter if directory is empty --- diff --git a/src/nnn.c b/src/nnn.c index 499073e5..3d866bf4 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -6868,6 +6868,8 @@ nochange: printwait(mark, &presel); goto nochange; case SEL_FLTR: + if (!ndents) + goto nochange; /* Unwatch dir if we are still in a filtered view */ #ifdef LINUX_INOTIFY if (inotify_wd >= 0) {