Xavier de Gaye wrote:

> >> On Sun, Nov 9, 2008 at 5:18 PM, Xavier de Gaye <[EMAIL PROTECTED]> wrote:
> >> > It is not clear if netbeans "killed" events are correctly sent by Vim.
> >> > ...
> >> > Conclusion:
> >> > As it is, "killed" events are useless for the netbeans application
> >> > (but they cannot be ignored as the bufno reference is not anymore
> >> > valid after receiving the event).
> >> > I would like to propose to remove the global netbeansCloseFile
> >> > entirely from the code, expecting that this would cause a "killed"
> >> > event whenever a buffer is not anymore visible in any window, but I
> >> > don't know Vim code sufficiently to be sure that this is the case.
> >>
> >>
> >> I have missed the following important point: the Vim signs placed in
> >> the buffer are removed by bdelete and by bwipeout, but not by bunload
> >> or by any other Vim command.
> >>
> >> The netbeans application must keep track of the Vim signs, so I
> >> suggest:
> >>     * the semantics of the "killed" event is:
> >>         the bufno reference is invalid
> >>         the signs have been removed by Vim
> >>     * the code is changed so that only bdelete and bwipeout
> >>       trigger a "killed" event (not bunload)
> >>     * the documentation is updated accordingly
> >
> > One wonders what the original meaning for "killed" is: buffer deleted or
> > unloaded?  I don't know.
> >
> > What is more useful?  Perhaps we need both a "killed" and an "unloaded"
> > event?
> 
> 
> Having "unloaded" events would be nice and would allow the netbeans
> application or IDE to know when a buffer is not visible.
> 
> But the main problem is that Vim and the netbeans application must
> maintain the list of netbeans buffers and the corresponding signs
> (netbeans annotations) in a consistent state. So I think buffer
> deletion notifications (caused by bdelete and bwipeout commands, that
> remove the signs in a buffer) are needed and should be mapped to
> "killed" events.

OK.  So a ":quit" will not cause a "killed" event.

> I think this can be fixed by calling netbeans_file_closed() from
> free_buffer_stuff(), just after buf_delete_signs(). This would cause a
> "killed" event to be sent when bdelete or bwipeout are invoked.
> 
> What do you think ? I did not understand what issue is fixed by
> calling netbeans_file_closed() from buf_freeall(), in your other mail.

It's just that calling netbeans_file_closed() from one place avoids that
it's not called when making changes.  But it may be called at the wrong
moment, one needs to inspect the code to check.

-- 
The term "free software" is defined by Richard M. Stallman as
being software that isn't necessarily for free.  Confusing?
Let's call it "Stallman software" then!
                                -- Bram Moolenaar

 /// 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
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui