1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2021-02-10 14:56:11 +01:00
parent 4223d43c0f
commit 82db31c104
6 changed files with 81 additions and 0 deletions

View File

@@ -1193,6 +1193,12 @@ popup_adjust_position(win_T *wp)
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