Code

Initialise views and screens with nonzero size.
authorLoui Chang <louipc.ist@gmail.com>
Sun, 27 Feb 2011 21:29:35 +0000 (16:29 -0500)
committerJonas Fonseca <fonseca@diku.dk>
Mon, 7 Mar 2011 01:05:40 +0000 (20:05 -0500)
This fixes problems with ncurses 2.8

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tig.c

diff --git a/tig.c b/tig.c
index 8933e3092a47bc62860430f2fa920dce978eb4a5..72bcf8b8883c0a97ffbc32c4892b2915c526155e 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -2724,13 +2724,13 @@ resize_display(void)
 
        foreach_displayed_view (view, i) {
                if (!display_win[i]) {
-                       display_win[i] = newwin(view->height, 0, offset, 0);
+                       display_win[i] = newwin(view->height, view->width, offset, 0);
                        if (!display_win[i])
                                die("Failed to create %s view", view->name);
 
                        scrollok(display_win[i], FALSE);
 
-                       display_title[i] = newwin(1, 0, offset + view->height, 0);
+                       display_title[i] = newwin(1, view->width, offset + view->height, 0);
                        if (!display_title[i])
                                die("Failed to create title window");
 
@@ -7096,7 +7096,7 @@ init_display(void)
                init_colors();
 
        getmaxyx(stdscr, y, x);
-       status_win = newwin(1, 0, y - 1, 0);
+       status_win = newwin(1, x, y - 1, 0);
        if (!status_win)
                die("Failed to create status window");