From 4337214f501a7911faf84be481bff31eee7f30e0 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sun, 29 May 2022 20:17:55 +0530 Subject: [PATCH] Fix reverting filtermode on empty directory --- src/nnn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nnn.c b/src/nnn.c index 0c2b8107..ca0aab23 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -6908,7 +6908,8 @@ nochange: /* Cannot descend in empty directories */ if (!ndents) { cd = FALSE; - cfg.filtermode = g_state.selbm - 1; + if (g_state.selbm) + cfg.filtermode = g_state.selbm - 1; g_state.selbm = g_state.runplugin = 0; goto begin; }