]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix: crash on entering empty dir, then press down
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 16 Jan 2020 22:06:57 +0000 (03:36 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 16 Jan 2020 22:06:57 +0000 (03:36 +0530)
src/nnn.c

index 5dd47ce1a26382ca4b457aad7a0d544d1c81e04a..0cd723be4046f96b24ab2857cef4a7d4024c50ef 100644 (file)
--- 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);
        }