diff src/memline.c @ 630:52c87a746f4a v7.0181

updated for version 7.0181
author vimboss
date Sat, 14 Jan 2006 21:23:38 +0000
parents 81fe2ccc1207
children 5b101ff9d4c4
line wrap: on
line diff
--- a/src/memline.c
+++ b/src/memline.c
@@ -563,7 +563,13 @@ ml_open_file(buf)
 
 	    /* Flush block zero, so others can read it */
 	    if (mf_sync(mfp, MFS_ZERO) == OK)
+	    {
+		/* Mark all blocks that should be in the swapfile as dirty.
+		 * Needed for when the 'swapfile' option was reset, so that
+		 * the swap file was deleted, and then on again. */
+		mf_set_dirty(mfp);
 		break;
+	    }
 	    /* Writing block 0 failed: close the file and try another dir */
 	    mf_close_file(buf, FALSE);
 	}