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.
diff --git a/src/popupwin.c b/src/popupwin.c
index df0cda8..099a0c2 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -855,8 +855,8 @@
 	if (wp->w_width < len)
 	    wp->w_width = len;
 	// do not use the width of lines we're not going to show
-	if (wp->w_maxheight > 0 && wp->w_buffer->b_ml.ml_line_count
-			       - wp->w_topline + 1 + wrapped > wp->w_maxheight)
+	if (wp->w_maxheight > 0
+		       && lnum - wp->w_topline + 1 + wrapped > wp->w_maxheight)
 	    break;
     }