diff --git a/pager.cpp b/pager.cpp index c4a6fc058..002479bce 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