0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.3.437

Problem:    Continue looping inside FOR_ALL_TAB_WINDOWS even when already done.
Solution:   Use goto instead of break. (Hirohito Higashi)
This commit is contained in:
Bram Moolenaar
2012-02-11 23:45:37 +01:00
parent 68ba0dd633
commit 28f2908d95
3 changed files with 8 additions and 1 deletions

View File

@@ -8898,10 +8898,11 @@ aucmd_restbuf(aco)
if (tp != curtab) if (tp != curtab)
goto_tabpage_tp(tp); goto_tabpage_tp(tp);
win_goto(aucmd_win); win_goto(aucmd_win);
break; goto win_found;
} }
} }
} }
win_found:
/* Remove the window and frame from the tree of frames. */ /* Remove the window and frame from the tree of frames. */
(void)winframe_remove(curwin, &dummy, NULL); (void)winframe_remove(curwin, &dummy, NULL);

View File

@@ -535,6 +535,10 @@ EXTERN win_T *lastwin; /* last window */
EXTERN win_T *prevwin INIT(= NULL); /* previous window */ EXTERN win_T *prevwin INIT(= NULL); /* previous window */
# define W_NEXT(wp) ((wp)->w_next) # define W_NEXT(wp) ((wp)->w_next)
# define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next) # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
/*
* When using this macro "break" only breaks out of the inner loop. Use "goto"
* to break out of the tabpage loop.
*/
# define FOR_ALL_TAB_WINDOWS(tp, wp) \ # define FOR_ALL_TAB_WINDOWS(tp, wp) \
for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \ for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
for ((wp) = ((tp) == curtab) \ for ((wp) = ((tp) == curtab) \

View File

@@ -714,6 +714,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
437,
/**/ /**/
436, 436,
/**/ /**/