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: neomutt-20160822~155 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6e6866f23af9f3f58c06ba943264113076ff18b;p=neomutt 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 5320a1cb2..d47842abf 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));