From 85f9b524531fd1ba25568e630fc9dee857d5df47 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Thu, 15 Jan 2009 20:28:04 +0100 Subject: [PATCH] Fix regressions introduced in the last few dirty flag changes Regressions was introduced in ddc5064c42f2adab639feeacf86729a44f06f216. --- tig.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tig.c b/tig.c index c141288..d5c8a24 100644 --- a/tig.c +++ b/tig.c @@ -2012,9 +2012,9 @@ redraw_view_dirty(struct view *view) int lineno; for (lineno = 0; lineno < view->height; lineno++) { - struct line *line = &view->line[view->offset + lineno]; - - if (!line->dirty) + if (view->offset + lineno >= view->lines) + break; + if (!view->line[view->offset + lineno].dirty) continue; dirty = TRUE; if (!draw_view_line(view, lineno)) @@ -2682,7 +2682,7 @@ update_view(struct view *view) char *line; /* Clear the view and redraw everything since the tree sorting * might have rearranged things. */ - bool redraw = FALSE; + bool redraw = view->lines == 0; bool can_read = TRUE; if (!view->pipe) @@ -2735,7 +2735,7 @@ update_view(struct view *view) /* Keep the displayed view in sync with line number scaling. */ if (digits != view->digits) { view->digits = digits; - if (opt_line_number) + if (opt_line_number || view == VIEW(REQ_VIEW_BLAME)) redraw = TRUE; } } -- 2.30.2