comparison src/popupwin.c @ 17245:13a2d3364b3f v8.1.1622

patch 8.1.1622: wrong width if displaying a lot of lines in a popup window commit https://github.com/vim/vim/commit/e296e3177b67bdcaa8b1f144d2495b9413e7055c Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 3 23:20:18 2019 +0200 patch 8.1.1622: wrong width if displaying a lot of lines in a popup window Problem: Wrong width if displaying a lot of lines in a popup window. Solution: Accurately compute the line overflow.
author Bram Moolenaar <Bram@vim.org>
date Wed, 03 Jul 2019 23:30:07 +0200
parents 3ada3d207b33
children 6a7ba68d448e
comparison
equal deleted inserted replaced
17244:dbfac1327a2e 17245:13a2d3364b3f
853 wp->w_width = maxwidth; 853 wp->w_width = maxwidth;
854 } 854 }
855 if (wp->w_width < len) 855 if (wp->w_width < len)
856 wp->w_width = len; 856 wp->w_width = len;
857 // do not use the width of lines we're not going to show 857 // do not use the width of lines we're not going to show
858 if (wp->w_maxheight > 0 && wp->w_buffer->b_ml.ml_line_count 858 if (wp->w_maxheight > 0
859 - wp->w_topline + 1 + wrapped > wp->w_maxheight) 859 && lnum - wp->w_topline + 1 + wrapped > wp->w_maxheight)
860 break; 860 break;
861 } 861 }
862 862
863 wp->w_has_scrollbar = wp->w_want_scrollbar 863 wp->w_has_scrollbar = wp->w_want_scrollbar
864 && (wp->w_topline > 1 || lnum <= wp->w_buffer->b_ml.ml_line_count); 864 && (wp->w_topline > 1 || lnum <= wp->w_buffer->b_ml.ml_line_count);