patch 8.2.0011: screen updating wrong when opeing preview window

Problem:    Screen updating wrong when opeing preview window.
Solution:   Redraw the window when the preview window opens.
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim
index ad62944..95954f5 100644
--- a/src/testdir/test_ins_complete.vim
+++ b/src/testdir/test_ins_complete.vim
@@ -404,3 +404,30 @@
   call StopVimInTerminal(buf)
   call delete('Xpumscript')
 endfunc
+
+func Test_pum_with_preview_win()
+  CheckScreendump
+
+  let lines =<< trim END
+      funct Omni_test(findstart, base)
+	if a:findstart
+	  return col(".") - 1
+	endif
+	return [#{word: "one", info: "1info"}, #{word: "two", info: "2info"}, #{word: "three", info: "3info"}]
+      endfunc
+      set omnifunc=Omni_test
+      set completeopt+=longest
+  END
+
+  call writefile(lines, 'Xpreviewscript')
+  let buf = RunVimInTerminal('-S Xpreviewscript', #{rows: 12})
+  call term_wait(buf, 100)
+  call term_sendkeys(buf, "Gi\<C-X>\<C-O>")
+  call term_wait(buf, 100)
+  call term_sendkeys(buf, "\<C-N>")
+  call VerifyScreenDump(buf, 'Test_pum_with_preview_win', {})
+
+  call term_sendkeys(buf, "\<Esc>")
+  call StopVimInTerminal(buf)
+  call delete('Xpreviewscript')
+endfunc