patch 8.2.1414: popupwindow missing last couple of lines

Problem:    Popupwindow missing last couple of lines when cursor is in the
            first line.
Solution:   Compute the max height also when top aligned. (closes #6664)
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index c44c847..f13a7e0 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -753,6 +753,7 @@
 	    \ posinvert: 0,
 	    \ wrap: 0,
 	    \ fixed: 1,
+	    \ scrollbar: v:false,
 	    \ zindex: 90,
 	    \ padding: [],
 	    \ highlight: 'PopupColor',
@@ -772,6 +773,7 @@
 	    \ posinvert: 0,
 	    \ wrap: 0,
 	    \ fixed: 1,
+	    \ scrollbar: v:false,
 	    \ close: 'button',
 	    \ zindex: 90,
 	    \ padding: [],
@@ -2169,6 +2171,11 @@
   call term_sendkeys(buf, ":call ShowPopup()\<CR>")
   call VerifyScreenDump(buf, 'Test_popupwin_toohigh_2', {})
 
+  call term_sendkeys(buf, ":call popup_clear()\<CR>")
+  call term_sendkeys(buf, "gg$")
+  call term_sendkeys(buf, ":call ShowPopup()\<CR>")
+  call VerifyScreenDump(buf, 'Test_popupwin_toohigh_3', {})
+
   " clean up
   call StopVimInTerminal(buf)
   call delete('XtestPopupToohigh')