diff runtime/doc/usr_11.txt @ 2162:0527eb0f6918 vim73

After recovery check if the text changed. If it did mark the buffer as modified.
author Bram Moolenaar <bram@vim.org>
date Sat, 15 May 2010 17:06:53 +0200
parents 7c8c7c95a865
children 733f0dc510c3 c08f91142c41
line wrap: on
line diff
--- a/runtime/doc/usr_11.txt
+++ b/runtime/doc/usr_11.txt
@@ -29,29 +29,45 @@ with the "-r" argument added: >
 	vim -r help.txt
 
 Vim will read the swap file (used to store text you were editing) and may read
-bits and pieces of the original file.  If all is well, you will see these
-messages (with different file names, of course):
+bits and pieces of the original file.  If Vim recovered your changes you will
+see these messages (with different file names, of course):
 
 	Using swap file ".help.txt.swp" ~
 	Original file "~/vim/runtime/doc/help.txt" ~
 	Recovery completed. You should check if everything is OK. ~
 	(You might want to write out this file under another name ~
 	and run diff with the original file to check for changes) ~
-	Delete the .swp file afterwards. ~
+	You may want to delete the .swp file now. ~
 
 To be on the safe side, write this file under another name: >
 
 	:write help.txt.recovered
 
 Compare the file with the original file to check if you ended up with what you
-expected.  Vimdiff is very useful for this |08.7|.  Watch out for the original
-file to contain a more recent version (you saved the file just before the
-computer crashed).  And check that no lines are missing (something went wrong
-that Vim could not recover).
+expected.  Vimdiff is very useful for this |08.7|.  For example: >
+
+	:write help.txt.recovered
+	:edit #
+	:diffsp help.txt
+
+Watch out for the original file to contain a more recent version (you saved
+the file just before the computer crashed).  And check that no lines are
+missing (something went wrong that Vim could not recover).
    If Vim produces warning messages when recovering, read them carefully.
 This is rare though.
 
-It's normal that the last few changes can not be recovered.  Vim flushes the
+If the recovery resulted in text that is exactly the same as the file
+contents, you will get this message:
+
+	Using swap file ".help.txt.swp" ~
+	Original file "~/vim/runtime/doc/help.txt" ~
+	Recovery completed. Buffer contents equals file contents. ~
+	You may want to delete the .swp file now. ~
+
+This usually happens if you already recovered your changes, or you wrote the
+file after making changes.  It is safe to delete the swap file now.
+
+It is normal that the last few changes can not be recovered.  Vim flushes the
 changes to disk when you don't type for about four seconds, or after typing
 about two hundred characters.  This is set with the 'updatetime' and
 'updatecount' options.  Thus when Vim didn't get a chance to save itself when