]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix #744
authorArun Prakash Jana <engineerarun@gmail.com>
Mon, 28 Sep 2020 16:43:33 +0000 (22:13 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 28 Sep 2020 16:43:33 +0000 (22:13 +0530)
src/nnn.c

index 82a80eb86ccdd84159002676dc4dccf203882fe2..5110a14f6ec675960db6f20487abdc71c2bd06d3 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5716,10 +5716,15 @@ static void redraw(char *path)
 
        attroff(A_UNDERLINE | COLOR_PAIR(cfg.curctx + 1));
 
+       ncols = adjust_cols(ncols);
+
        /* Go to first entry */
-       move(2, 0);
+       if (curscroll > 0) {
+               move(1, 0);
+               addch('^');
+       }
 
-       ncols = adjust_cols(ncols);
+       move(2, 0);
 
        if (g_state.oldcolor) {
                attron(COLOR_PAIR(cfg.curctx + 1) | A_BOLD);
@@ -5736,6 +5741,12 @@ static void redraw(char *path)
                g_state.dircolor = 0;
        }
 
+       /* Go to first entry */
+       if (i < ndents) {
+               move(xlines - 2, 0);
+               addch('v');
+       }
+
        statusbar(path);
 }