patch 8.1.1773: the preview popup window may be too far to the right
Problem: The preview popup window may be too far to the right.
Solution: Keep it inside the screen. Also keep the close button and
scrollbar visible if possible.
diff --git a/src/screen.c b/src/screen.c
index a8850bf..04d0e2f 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -795,6 +795,11 @@
FOR_ALL_WINDOWS(wp)
wp->w_buffer->b_mod_set = FALSE;
+#ifdef FEAT_TEXT_PROP
+ // Display popup windows on top of the windows and command line.
+ update_popups(win_update);
+#endif
+
after_updating_screen(TRUE);
/* Clear or redraw the command line. Done last, because scrolling may
@@ -810,11 +815,6 @@
maybe_intro_message();
did_intro = TRUE;
-#ifdef FEAT_TEXT_PROP
- // Display popup windows on top of the windows.
- update_popups(win_update);
-#endif
-
#ifdef FEAT_GUI
/* Redraw the cursor and update the scrollbars when all screen updating is
* done. */