diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-06-26 01:03:53 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-06-26 01:03:53 +0200 |
commit | c2a43165004f944a909428e80700130745c08ed0 (patch) | |
tree | 4f47a5d17a466b08c352d9395bf22afff8ada61e | |
parent | 88c47aa692a4b1061f86624ea2503f31314f3975 (diff) | |
download | vim-git-c2a43165004f944a909428e80700130745c08ed0.tar.gz |
patch 8.1.1596: when resizing the screen may draw popup in wrong positionv8.1.1596
Problem: When resizing the screen may draw popup in wrong position. (Masato
Nishihata)
Solution: Check the popup is not outside of the screen. (fixes #4592)
-rw-r--r-- | src/popupwin.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/popupwin.c b/src/popupwin.c index aa8bba088..b9526c7ff 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -2154,8 +2154,9 @@ update_popups(void (*win_update)(win_T *wp)) wp->w_winrow += top_off; wp->w_wincol += left_off; - // Draw the popup text. - win_update(wp); + // Draw the popup text, unless it's off screen. + if (wp->w_winrow < screen_Rows && wp->w_wincol < screen_Columns) + win_update(wp); wp->w_winrow -= top_off; wp->w_wincol -= left_off; diff --git a/src/version.c b/src/version.c index 0631f09b2..fa4e50dea 100644 --- a/src/version.c +++ b/src/version.c @@ -778,6 +778,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1596, +/**/ 1595, /**/ 1594, |