* James Vega <[email protected]> [100416 11:43]: > On Fri, Apr 16, 2010 at 11:28 AM, Marvin Renich <[email protected]> wrote: > > Shouldn't this set curbuf->b_changed based on the "modified" setting > > from the swap file, so that if you "recover" a file that was not > > modified, you don't set the modified flag? > > I'd think that any time you recover from a swap file, the buffer should > be considered "modified". The modified flag indicates that the buffer > is different than the on-disk file with the same name. Whether or not > the buffer was modified at the time that the swap file was last updated > has no bearing on whether the content recovered from the swap file > matches the current contents of the file that was being edited. That's > up to the user to diagnose and decide what steps to take.
Maybe I am missing something. If you are recovering from a swap file, doesn't Vim read the current version of the file from disk, then apply the changes that are in the swap file? So, if the swap file has modified=no, the buffer will match the current version of the file on disk. Is there something else going on that I have missed? I don't think this is a big deal; if you are explicitly recovering, you probably are paying attention to what you are doing, but then again, this patch is because people asked to be notified if they try to quit without saving after recovering. ...Marvin -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php Subscription settings: http://groups.google.com/group/vim_dev/subscribe?hl=en
