updated for version 7.0-239
diff --git a/src/fileio.c b/src/fileio.c
index 20406bb..a612c59 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -8086,7 +8086,10 @@
/* execute the autocommands for this buffer */
retval = do_doautocmd(eap->arg, FALSE);
- do_modelines(0);
+
+ /* Execute the modeline settings, but don't set window-local
+ * options if we are using the current window for another buffer. */
+ do_modelines(aco.save_curwin == NULL ? OPT_NOWIN : 0);
/* restore the current window */
aucmd_restbuf(&aco);