patch 8.1.1967: line() only works for the current window

Problem:    Line() only works for the current window.
Solution:   Add an optional argument for the window to use.
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 8f2b5dc..8fd4da1 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -346,6 +346,10 @@
   redraw
   call assert_equal(11, popup_getoptions(winid).firstline)
   call assert_equal(11, popup_getpos(winid).firstline)
+  " check line() works with popup window
+  call assert_equal(11, line('.', winid))
+  call assert_equal(50, line('$', winid))
+  call assert_equal(0, line('$', 123456))
 
   " Normal command changes what is displayed but not "firstline"
   call win_execute(winid, "normal! \<c-y>")