Code

Fix 'tig show <commit>' fix which causes empty tree views
[tig.git] / tig.c
diff --git a/tig.c b/tig.c
index 7bc5daaaeeb440018bcb7642e42af11c66ea63ad..37a779cadea5d7abc85a55d8d40de453e1db9683 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -3332,7 +3332,7 @@ static bool
 prepare_io(struct view *view, const char *dir, const char *argv[], bool replace)
 {
        view->dir = dir;
-       return format_argv(&view->argv, argv, replace, !view->parent);
+       return format_argv(&view->argv, argv, replace, !view->prev);
 }
 
 static bool
@@ -7111,7 +7111,11 @@ init_display(void)
        keypad(status_win, TRUE);
        wbkgdset(status_win, get_line_attr(LINE_STATUS));
 
+#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20080119)
        set_tabsize(opt_tab_size);
+#else
+       TABSIZE = opt_tab_size;
+#endif
 
        term = getenv("XTERM_VERSION") ? NULL : getenv("COLORTERM");
        if (term && !strcmp(term, "gnome-terminal")) {