File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2488,7 +2488,7 @@ winbar_click(win_T *wp, int col)
24882488
24892489 if (col >= item -> wb_startcol && col <= item -> wb_endcol )
24902490 {
2491- win_T * save_curwin = NULL ;
2491+ win_T * save_curwin = NULL ;
24922492 pos_T save_visual = VIsual ;
24932493 int save_visual_active = VIsual_active ;
24942494 int save_visual_select = VIsual_select ;
@@ -2506,9 +2506,10 @@ winbar_click(win_T *wp, int col)
25062506 check_cursor ();
25072507 }
25082508
2509+ // Note: the command might close the current window.
25092510 execute_menu (NULL , item -> wb_menu , -1 );
25102511
2511- if (save_curwin != NULL )
2512+ if (save_curwin != NULL && win_valid ( save_curwin ) )
25122513 {
25132514 curwin = save_curwin ;
25142515 curbuf = curwin -> w_buffer ;
@@ -2518,6 +2519,8 @@ winbar_click(win_T *wp, int col)
25182519 VIsual_reselect = save_visual_reselect ;
25192520 VIsual_mode = save_visual_mode ;
25202521 }
2522+ if (!win_valid (wp ))
2523+ break ;
25212524 }
25222525 }
25232526}
Original file line number Diff line number Diff line change @@ -767,6 +767,8 @@ static char *(features[]) =
767767
768768static int included_patches [] =
769769{ /* Add new patch number below this line */
770+ /**/
771+ 1264 ,
770772/**/
771773 1263 ,
772774/**/
You can’t perform that action at this time.
0 commit comments