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

Re: Extraneous BufUnload event triggered

Expand Messages
  • Marcin Szamotulski
    ... Hello, Here is a patch. I tested that it works with :cclose, and :lclose commands, i.e. does not block BufUnload on them. Are there any other commands
    Message 1 of 3 , Jul 22 9:56 AM
    • 0 Attachment
      On 17:51 Mon 22 Jul , Bram Moolenaar wrote:
      >
      > Pokey Rule wrote:
      >
      > > I run vim with no file on the command-line, so that it shows the
      > > scratch buffer. When I then run
      > >
      > > :e foo
      > >
      > > to edit file 'foo', there is a BufUnload event triggered for file
      > > 'foo'. Here is a test vim command that I use to demonstrate the issue:
      > >
      > > autocmd BufUnload * echom "Unloaded " . expand("<afile>")
      > >
      > > I posted this issue to stackoverflow, where user Ingo Karkat responded:
      > >
      > > I can reproduce this with the latest Vim 7.4a.39. I guess this has to
      > > do with the fact that Vim reuses the initial scratch buffer number (1)
      > > for the first :edited file. Please report this problem to the vim_dev
      > > mailing list.
      >
      > Thanks, I'll add a note to the todo list.
      >
      > --
      > hundred-and-one symptoms of being an internet addict:
      > 8. You spend half of the plane trip with your laptop on your lap...and your
      > child in the overhead compartment.
      >
      > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      > \\\ an exciting new programming language -- http://www.Zimbu.org ///
      > \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
      >

      Hello,

      Here is a patch. I tested that it works with :cclose, and :lclose
      commands, i.e. does not block BufUnload on them.

      Are there any other commands that should be checked?

      Regards,
      Marcin Szamotulski

      --
      --
      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 vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.