On Wed, Mar 23, 2016 at 10:28 PM, Ben Fritz <fritzophre...@gmail.com> wrote:

> On Wednesday, March 23, 2016 at 6:21:21 PM UTC-5, Manuel Ortega wrote:
> > > That reminds me of something else. Why isn't 'modified' set when you
> change cryptmethod or the encryption password?
> >
> >
> > Isn't it because the *buffer* hasn't changed?  IIUC, in the latter case
> the *file* changes, not the buffer.  In the former case neither has
> changed, so for sure 'modified' should not be set.
> >
> >
>
> If you change any of 'fileformat', 'fileencoding', 'bomb', or 'nofixeol'
> then the buffer doesn't change either, only the file. 'cryptmethod' is the
> oddball here.
>

I knew about the first two, but the last two are *really* surprising.  They
aren't mentioned at ":help 'mod'", nor are they mentioned at their own
respective ":help"s.  (Bram, if this is the intended behavior, it should
probably be documented at least at :h 'mod', and probably :h 'bomb' and :h
'fixeol'.)


> I view the 'modified' flag as saying "if you save this buffer then the
> file will change".
>

If that's what it means, the docs need to be fixed.


> I got caught once while I was testing something where I had the wrong
> password because I had quit Vim after changing the password, but I hadn't
> saved yet. Vim let me do that without any complaint, because the buffer
> wasn't modified.
>

Changing 'cryptmethod' should ONLY result in a setting of &mod if &key is
set to something.  If I haven't turned encryption on, so to speak, then
setting &cm to "blowfish2" shouldn't set the modified flag.  (For under
this circumstance, the file will not change even if the buffer is saved).

-Manny

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to