]> Sergey Matveev's repositories - nnn.git/commitdiff
netbsd-curses: fix broken statusbar issue
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 13 May 2021 18:46:48 +0000 (00:16 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 13 May 2021 18:46:48 +0000 (00:16 +0530)
See https://github.com/sabotage-linux/netbsd-curses/issues/46

src/nnn.c

index 91b97ebfaf2c3b2cb0d1a2e8d0d9bbf19bd014c4..78ee932d913b84de0ac8a8e0c07bd1c55729291b 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5783,8 +5783,7 @@ static void draw_line(char *path, int ncols)
 
 static void redraw(char *path)
 {
-       xlines = LINES;
-       xcols = COLS;
+       getmaxyx(stdscr, xlines, xcols);
 
        int ncols = (xcols <= PATH_MAX) ? xcols : PATH_MAX;
        int onscreen = xlines - 4;