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

Re: Modified [+] behavior on statusline

Expand Messages
  • Hari Krishna Dara
    ... Ok, I was wrong, the autocommand gets triggered even for bare :w and :wq commands. The fix is to simply avoid the workaround in such cases. I have updated
    Message 1 of 14 , Nov 1, 2004
      On Mon, 1 Nov 2004 at 9:46am, Hari Krishna Dara wrote:

      >
      > On Sun, 31 Oct 2004 at 5:14pm, Mathias Michaelis wrote:
      >
      > > Hello Hari
      > >
      > > >> Why is the "Modified flag"/[+] in the statusline showing that
      > > >> the file is not modified (IOW [+] disappears), when the file
      > > >> has been modified and saved as a *different* file.
      > > >>
      > > > I don't know if anyone saw this message, but I had a chance to
      > > > test this out and correct a problem. Now it seems to work as
      > > > expected at least for the regular files that I tested. I have
      > > > created a Tip with this information at the below URL:
      > > >
      > > > http://www.vim.org/tips/tip.php?tip_id=812
      > > >
      > > I simply tried out your tip without understanding every and each
      > > detail. Alas, it's a problem that when I type :w or :wq now to save
      > > (and exit) vim, the "modified flag [+]" does not disappear and so I
      > > cannot quit vim with :wq.
      > >
      > > In my opinion, the "modified flag [+]" should disapear if one writes
      > > the buffer to its associated file. However, if one writes the buffer
      > > to a *different* file, it shoud not disapear.
      > >
      > > Thanks anyway!
      > > Mathias
      > >
      >
      > I didn't expect this to impact the :w and :wq commands without filename
      > arguments because they shouldn't trigger this autocommand. May be my
      > understanding isn't correct, let me research in to this.
      >
      >

      Ok, I was wrong, the autocommand gets triggered even for bare :w and :wq
      commands. The fix is to simply avoid the workaround in such cases. I
      have updated the tip with this information. Thanks again for reporting
      this issue.

      --
      Thanks,
      Hari



      __________________________________
      Do you Yahoo!?
      Check out the new Yahoo! Front Page.
      www.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.