diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-02-10 14:56:11 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-02-10 14:56:11 +0100 |
commit | 82db31c10470b0e27d7039d15c32ed7e9417cc02 (patch) | |
tree | 7fb45f0c12a291615d822b48865fe696f1fac866 /src/popupwin.c | |
parent | 4223d43c0fb6ead1e611e4469a1680a9228b6015 (diff) | |
download | vim-git-82db31c10470b0e27d7039d15c32ed7e9417cc02.tar.gz |
patch 8.2.2491: popup window for text property may show in first screen linev8.2.2491
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)
Diffstat (limited to 'src/popupwin.c')
-rw-r--r-- | src/popupwin.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/popupwin.c b/src/popupwin.c index 47e7338b7..b0895528e 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -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 |