Loading ...
Sorry, an error occurred while loading the content.

RE: Bug - :wa! behaviour

Expand Messages
  • Bram Moolenaar
    ... OK, I now understand what you were doing: The file itself was read-only. I tried with the readonly option set, that s not the same. I ll include your
    Message 1 of 4 , Nov 29, 2000
    • 0 Attachment
      Vince Negri wrote:

      > > > However, if I make changes to a number of read-only buffers, and try
      > > > to :wa!, I get the message "<buffer> is read-only" for each of them,
      > > > and irritatingly it tells me to use "!"
      > > >
      > > > "But I *did*!!" I think at this point. It appears that ":wa!" is no
      > > > different from ":wa".
      >
      > > Hmm, for me it works as the docs say. What is different in your setup?
      > > Which version of Vim?
      >
      > 6.0n on Win32 console. What happens is that the ! allows
      > the first read-only check to be passed, but there is an additional
      > check in buf_write_all()... this was introduced as I recall
      > to guard against a file being made read-only behind Vim's back.
      > Anyhow the eap->forceit was not passed down into buf_write_all(),
      > that's what my patch fixed.

      OK, I now understand what you were doing: The file itself was read-only. I
      tried with the 'readonly' option set, that's not the same.

      I'll include your patch, thanks!

      --
      GUARD #1: Where'd you get the coconut?
      ARTHUR: We found them.
      GUARD #1: Found them? In Mercea? The coconut's tropical!
      ARTHUR: What do you mean?
      GUARD #1: Well, this is a temperate zone.
      The Quest for the Holy Grail (Monty Python)

      /// Bram Moolenaar Bram@... http://www.moolenaar.net \\\
      \\\ Vim: http://www.vim.org ICCF Holland: http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.