diff src/misc1.c @ 1987:613517f0b72a v7.2.284

updated for version 7.2-284
author vimboss
date Tue, 03 Nov 2009 17:47:12 +0000
parents 5ed9395c1864
children 077c15286de8
line wrap: on
line diff
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2886,6 +2886,13 @@ changed_common(lnum, col, lnume, xtra)
 		    }
 #endif
 		}
+
+#ifdef FEAT_FOLDING
+	    /* Take care of side effects for setting w_topline when folds have
+	     * changed.  Esp. when the buffer was changed in another window. */
+	    if (hasAnyFolding(wp))
+		set_topline(wp, wp->w_topline);
+#endif
 	}
     }