Xavier de Gaye wrote:
> On Thu, Nov 13, 2008 at 9:55 PM, Xavier de Gaye <[EMAIL PROTECTED]> wrote:
> > On Wed, Nov 12, 2008 at 10:45 PM, Bram Moolenaar <[EMAIL PROTECTED]> wrote:
> >>
> >> Xavier de Gaye wrote:
> >>
> >>> >> OK. So a ":quit" will not cause a "killed" event.
> >>> >
> >>> > ...unless, maybe, the result is to exit Vim? (But this case ought to be
> >>> > covered by BufDelete.)
> >>>
> >>> Actually, when ":quit" causes Vim to exit, "killed" events are
> >>> currently sent for each buffer known by netbeans, before the final
> >>> "disconnect" event that warns the application that netbeans is
> >>> terminating.
> >>
> >> Yes, I was thinking of ":quit" just closing a buffer, possibly unloading
> >> it. It's also possible that 'bufhidden' is set to "delete" or "wipe".
> >> So generally: unloading doesn't trigger killed, deleting or wiping out
> >> the buffer does.
> >
> > Right.
> > I will propose a patch that sends a "killed" events for all these
> > cases, plus for backward compatibily, when processing a
> > "stopDocumentListen" netbeans command and the buffer is marked as a
> > "netbeansBuffer" buffer.
>
>
> The attached patch is based on Vim subversion revision 1264, Vim
> version 7.2.49.
>
> Problem: "killed" netbeans events are not handled correctly.
>
> Solution: A "killed" netbeans event is sent when the buffer is deleted
> or wiped out (in this case, the netbeans annotations in this buffer
> have been removed). A user can still remove a sign with the command
> ":sign unplace" and this does not trigger a "killed" event.
>
> Tests run on Vim 7.2.49:
> Two buffers 'foo' and 'bar' displayed in split windows with a
> netbeans annotations placed on buffer 'foo'.
> A test is pass if a killed event is sent when (and only when) the
> Vim signs are removed.
>
> killed evt Vim signs test
> removed
> quit No No Ok
> quit (bufhidden=delete) No Yes Failed
> quit (bufhidden=wipe) No Yes Failed
> bunload foo Yes No Failed
> bdelete foo Yes Yes Ok
> bwipeout foo Yes. Yes Ok
> qall Yes Yes Ok
> stopDocumentListen Yes Yes Ok
>
> The last test has been run with 'clewn -d' and the commands:
> @ bufId netbeansBuffer T
> @ bufId stopDocumentListen
>
> Tests run with the attached patch applied:
>
> killed evt Vim signs status
> removed
> quit foo No No Ok
> quit foo (bh=delete) Yes Yes Ok
> quit foo (bh=wipe) Yes Yes Ok
> bunload foo No No Ok
> bdlete foo Yes Yes Ok
> bwipeout foo Yes Yes Ok
> qall Yes Yes Ok
> stopDocumentListen Yes Yes Ok
Great, thanks. I'll look into it later.
--
TALL KNIGHT OF NI: Ni!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---