Friday, June 14, 2013

Re: Bug with (or without) 'Z' in cpoptions writing to read-only file

Linda W wrote:
> This used to work, but stopped about 18 months ago, I think.
>
> Now, I've both with 'Z' and without in cpoptions, but
> notice when I write a file with "w!", the read-only flag
> is still being reset to it's initial state.
I have figured out at least one place that causes this..

It seems that some .vim scripts ignore the options in cpo
and install '&vim' options while the file is being
saved, then restore cpo after the fact so it looks like
the cpo options have no effect.

I don't think it would be affecting my usage, but an example of this
is in "menu.vim"...
Several places, the purpose is to make sure the "<" and "C" flags
are not included in cpoptions...
But that's not what the code does -- it resets them to some arbitrary state.

To remove those flags, one would use
cpo-="<C"
(as far as I know)....

Trouble is, with examples like that in the official Vim code, there's no
telling where else it might be a problem.

though I noticed signs that I've edited out those problem areas before
(but had my changes overwritten on a subsequent update.




--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment