diff src/window.c @ 19291:1d6bc6b31c2e v8.2.0204

patch 8.2.0204: crash when using winnr('j') in a popup window Commit: https://github.com/vim/vim/commit/631ebc48149a0446dd9ffbddd3e2822252085885 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 3 22:15:26 2020 +0100 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 https://github.com/vim/vim/issues/5568)
author Bram Moolenaar <Bram@vim.org>
date Mon, 03 Feb 2020 22:30:03 +0100
parents 2142fb624658
children 435726a03481
line wrap: on
line diff
--- a/src/window.c
+++ b/src/window.c
@@ -4431,6 +4431,11 @@ win_vert_neighbor(tabpage_T *tp, win_T *
     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 *
     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--)
     {