aboutsummaryrefslogtreecommitdiffhomepage
path: root/pager.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-11-09 13:08:09 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-11-09 13:08:09 -0800
commit58a0f7f09142a5eb4a7b20c649dbe45844f8e9ae (patch)
treeeb536e97dd2c96e3d33f2939075f86176c71b076 /pager.cpp
parent09bac97bb48c4682648ffea3c3a5290568606334 (diff)
Remove "squeezing" code in pager
The "squeezing" code attempted to force completions to fit onto a single screen, but could render them unreadable. Let's just get rid of it.
Diffstat (limited to 'pager.cpp')
-rw-r--r--pager.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/pager.cpp b/pager.cpp
index c4a6fc05..002479bc 100644
--- a/pager.cpp
+++ b/pager.cpp
@@ -525,54 +525,6 @@ bool pager_t::completion_try_print(size_t cols, const wcstring &prefix, const co
width = pref_width;
print = true;
}
- else
- {
- long next_rows = (lst.size()-1)/(cols-1)+1;
- /* fwprintf( stderr,
- L"cols %d, min_tot %d, term %d, rows=%d, nextrows %d, termrows %d, diff %d\n",
- cols,
- min_tot_width, term_width,
- rows, next_rows, term_height,
- pref_tot_width-term_width );
- */
- if (min_tot_width < term_width &&
- (((row_count < term_height) && (next_rows >= term_height)) ||
- (pref_tot_width-term_width< 4 && cols < 3)))
- {
- /*
- Terminal almost wide enough, or squeezing makes the
- whole list fit on-screen.
-
- This part of the code is really important. People hate
- having to scroll through the completion list. In cases
- where there are a huge number of completions, it can't
- be helped, but it is not uncommon for the completions to
- _almost_ fit on one screen. In those cases, it is almost
- always desirable to 'squeeze' the completions into a
- single page.
-
- If we are using N columns and can get everything to
- fit using squeezing, but everything would also fit
- using N-1 columns, don't try.
- */
-
- int tot_width = min_tot_width;
- width = min_width;
-
- while (tot_width < term_width)
- {
- for (long i=0; (i<cols) && (tot_width < term_width); i++)
- {
- if (width[i] < pref_width[i])
- {
- width[i]++;
- tot_width++;
- }
- }
- }
- print = true;
- }
- }
if (print)
{