From d40dbfd69ab074ae4ff4815ceacb8d437b6f6b84 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 16 Jul 2021 01:54:15 +0530 Subject: [PATCH] Do not apply filter if directory is empty --- src/nnn.c | 2 ++ 1 file changed, 2 insertions(+) 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) { -- 2.48.1