From 94a233b808e039d1a17aab4e12f1b1fb13302d54 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 17 Jan 2020 03:36:57 +0530 Subject: [PATCH] Fix: crash on entering empty dir, then press down --- src/nnn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nnn.c b/src/nnn.c index 5dd47ce1..0cd723be 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4380,7 +4380,7 @@ static void redraw(char *path) if (g_states & STATE_MOVE_OP) { g_states &= ~STATE_MOVE_OP; - if (last_curscroll == curscroll) + if (ndents && (last_curscroll == curscroll)) return draw_line(path, ncols); }