patch 8.2.2491: popup window for text property may show in first screen line
Problem: Popup window for text property may show in first screen line.
Solution: If the text position is invisible do not show the popup window.
(closes #7807)
diff --git a/src/popupwin.c b/src/popupwin.c
index 47e7338..b089552 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -1193,6 +1193,12 @@
textpos2screenpos(prop_win, &pos, &screen_row,
&screen_scol, &screen_ccol, &screen_ecol);
+ if (screen_scol == 0)
+ {
+ // position is off screen, make the width zero to hide it.
+ wp->w_width = 0;
+ return;
+ }
if (wp->w_popup_pos == POPPOS_TOPLEFT
|| wp->w_popup_pos == POPPOS_TOPRIGHT)
// below the text