0
0
mirror of https://github.com/vim/vim.git synced 2025-11-13 22:54:27 -05:00

patch 8.2.0204: crash when using winnr('j') in a popup window

Problem:    Crash when using winnr('j') in a popup window.
Solution:   Do not search for neighbors in a popup window. (closes #5568)
This commit is contained in:
Bram Moolenaar
2020-02-03 22:15:26 +01:00
parent e20b9ececa
commit 631ebc4814
4 changed files with 20 additions and 3 deletions

View File

@@ -4431,6 +4431,11 @@ win_vert_neighbor(tabpage_T *tp, win_T *wp, int up, long count)
frame_T *nfr;
frame_T *foundfr;
#ifdef FEAT_PROP_POPUP
if (popup_is_popup(wp))
// popups don't have neighbors.
return NULL;
#endif
foundfr = wp->w_frame;
while (count--)
{
@@ -4513,6 +4518,11 @@ win_horz_neighbor(tabpage_T *tp, win_T *wp, int left, long count)
frame_T *nfr;
frame_T *foundfr;
#ifdef FEAT_PROP_POPUP
if (popup_is_popup(wp))
// popups don't have neighbors.
return NULL;
#endif
foundfr = wp->w_frame;
while (count--)
{