summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-02-11 23:45:37 +0100
committerBram Moolenaar <Bram@vim.org>2012-02-11 23:45:37 +0100
commit28f2908d95a6c96801ebdb17735242a81295d095 (patch)
treee90c684d32fffa2c163d3959e132fcea47e75773
parent68ba0dd6332d38db5edabdd5f1bcb6fdc75d5f68 (diff)
updated for version 7.3.437v7.3.437
Problem: Continue looping inside FOR_ALL_TAB_WINDOWS even when already done. Solution: Use goto instead of break. (Hirohito Higashi)
-rw-r--r--src/fileio.c3
-rw-r--r--src/globals.h4
-rw-r--r--src/version.c2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index b30d31102e..8ed878d73b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -8898,10 +8898,11 @@ aucmd_restbuf(aco)
if (tp != curtab)
goto_tabpage_tp(tp);
win_goto(aucmd_win);
- break;
+ goto win_found;
}
}
}
+win_found:
/* Remove the window and frame from the tree of frames. */
(void)winframe_remove(curwin, &dummy, NULL);
diff --git a/src/globals.h b/src/globals.h
index 13851923f1..a9f1c2d970 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -535,6 +535,10 @@ EXTERN win_T *lastwin; /* last window */
EXTERN win_T *prevwin INIT(= NULL); /* previous window */
# define W_NEXT(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) \
for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
for ((wp) = ((tp) == curtab) \
diff --git a/src/version.c b/src/version.c
index 2c7ad8fb6b..59498a4caa 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 437,
+/**/
436,
/**/
435,