File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1437,6 +1437,7 @@ check_mouse_moved(win_T *wp, win_T *mouse_wp)
14371437
14381438 res .v_type = VAR_NUMBER ;
14391439 res .vval .v_number = -2 ;
1440+ // Careful: this makes "wp" invalid.
14401441 popup_close_and_callback (wp , & res );
14411442 }
14421443}
@@ -1447,18 +1448,24 @@ check_mouse_moved(win_T *wp, win_T *mouse_wp)
14471448 void
14481449popup_handle_mouse_moved (void )
14491450{
1450- win_T * wp ;
1451+ win_T * wp , * nextwp ;
14511452 win_T * mouse_wp ;
14521453 int row = mouse_row ;
14531454 int col = mouse_col ;
14541455
14551456 // find the window where the mouse is in
14561457 mouse_wp = mouse_find_win (& row , & col , FIND_POPUP );
14571458
1458- for (wp = first_popupwin ; wp != NULL ; wp = wp -> w_next )
1459+ for (wp = first_popupwin ; wp != NULL ; wp = nextwp )
1460+ {
1461+ nextwp = wp -> w_next ;
14591462 check_mouse_moved (wp , mouse_wp );
1460- for (wp = curtab -> tp_first_popupwin ; wp != NULL ; wp = wp -> w_next )
1463+ }
1464+ for (wp = curtab -> tp_first_popupwin ; wp != NULL ; wp = nextwp )
1465+ {
1466+ nextwp = wp -> w_next ;
14611467 check_mouse_moved (wp , mouse_wp );
1468+ }
14621469}
14631470
14641471/*
Original file line number Diff line number Diff line change @@ -777,6 +777,8 @@ static char *(features[]) =
777777
778778static int included_patches [] =
779779{ /* Add new patch number below this line */
780+ /**/
781+ 1649 ,
780782/**/
781783 1648 ,
782784/**/
You can’t perform that action at this time.
0 commit comments