From ede3d422a0ee8f5b3ed6ee20e08916c979784133 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Mon, 11 Aug 2014 09:55:07 -0700 Subject: [PATCH] Don't show "and 1 more rows" in pager if that requires a row --- pager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pager.cpp b/pager.cpp index b05732404..57f93184c 100644 --- a/pager.cpp +++ b/pager.cpp @@ -464,6 +464,13 @@ bool pager_t::completion_try_print(size_t cols, const wcstring &prefix, const co { rendering->remaining_to_disclose = 0; } + + /* If we have only one row remaining to disclose, then squelch the comment row. This prevents us from consuming a line to show "...and 1 more row" */ + if (! this->fully_disclosed && rendering->remaining_to_disclose == 1) + { + term_height += 1; + rendering->remaining_to_disclose = 0; + } int pref_tot_width=0; int min_tot_width = 0;