updated for version 7.2-161
diff --git a/src/fileio.c b/src/fileio.c
index eec68e8..4145c71 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -6846,10 +6846,11 @@
 #endif
 #ifdef FEAT_FOLDING
 	{
-	    win_T *wp;
+	    win_T	*wp;
+	    tabpage_T	*tp;
 
 	    /* Update folds unless they are defined manually. */
-	    FOR_ALL_WINDOWS(wp)
+	    FOR_ALL_TAB_WINDOWS(tp, wp)
 		if (wp->w_buffer == curwin->w_buffer
 			&& !foldmethodIsManual(wp))
 		    foldUpdateAll(wp);