From: Kevin McCarthy Date: Sat, 30 Apr 2016 20:05:43 +0000 (-0700) Subject: Fix pager mini-index drawing when $pager_index_lines = 1 and $status_on_top. X-Git-Tag: mutt-1-7-rel~108 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=165dd9b69b016d4625263d9b8c46d8e82855afe5;p=mutt Fix pager mini-index drawing when $pager_index_lines = 1 and $status_on_top. When $pager_index_lines is 1, there is room for the index status line, but not for any actual index entries. The index redraw part was always calling menu_redraw_current() which doesn't actually check if there is room for the current row. This bug only shows up with $status_on_top, due to the order things are redrawn. --- diff --git a/pager.c b/pager.c index 5320a1cb..d47842ab 100644 --- a/pager.c +++ b/pager.c @@ -1854,7 +1854,8 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra) { /* redraw the pager_index indicator, because the * flags for this message might have changed. */ - menu_redraw_current (index); + if (index_window->rows > 0) + menu_redraw_current (index); /* print out the index status bar */ menu_status_line (buffer, sizeof (buffer), index, NONULL(Status));