On Thu, Sep 06, 2012 at 09:37:08AM +0200, Christian Brabandt wrote:
> I also have noticed this behaviour and found it quite disturbing.
>
> I don't think, every user needs to mess with autocommands to find a
> solution that works for him, but rather Vim should make it right. So
> here is a patch:
>
> [snip]

Thanks for the patch, it works fine for me (and it would be great
if it could be included in Vim) but I have one problem.

I use the following snippet in my vimrc to reset all options to
their default values so system wide configuration files don't
affect my vimrc (too much). However 'diff' (e.g. via vimdiff) is
reset by all& - but somehow later restored, e.g. in a VimEnter
autocommand and later. Therefore I use the following snippet to
save it and make it accessible for if &diff checks later.

    let s:save_diff = &diff
    set all&
    let &diff = s:save_diff
    unlet s:save_diff

I don't know why, but if I add just these diff lines to my vimrc
(no plugins) then your patch doesn't work anymore, with just set
all& it works fine. Any ideas?

Regards,
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

Attachment: pgpnd2zufC9Gr.pgp
Description: PGP signature

Raspunde prin e-mail lui