Doing ":h diffoff" gives:
The ":diffoff" command resets the relevant options to the values they
had when using |:diffsplit|, |:diffpatch| , |:diffthis|. or starting Vim
in diff mode. Otherwise they are set to their default value:
'diff' off
'scrollbind' off
'cursorbind' off
'scrollopt' without "hor"
'wrap' on
'foldmethod' "manual"
'foldcolumn' 0
What this doesn't tell you is that :diffoff will perform this resetting
under more circumstances than mentioned, namely if diff mode was already
off; but in this circumstance, the resetting is both unexpected and
undesirable.
Specifically, if you forget that diff mode is already off and you do
:diffoff a second time, you will lose &scrollbind, &foldmethod, &wrap,
etc if you had them set to something other than those defaults. This is
really annoying. I kept wondering what happened to my folds!
Sometimes I had &scrollbind on outside of diff mode, and I lost it after
inadvertently doing a second :diffoff.
It's pretty easy to be lulled into thinking you need a :diffoff. If you
see a bunch of closed folds, you might think that's because you just
resolved the last difference, and now it's time to turn diff mode off.
I'm very much hoping that someone who knows how vim code works can make
a patch so that :diffoff will only do that resetting if diff mode was ON
when :diffoff was called.
-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 [email protected].
For more options, visit https://groups.google.com/d/optout.