Sunday, October 18, 2015

Re: Don't trigger BufLeave with preview window in popup completion menu

John Otter wrote:

> when opening the preview window in vim using commands like :pedit
> etc... the cursor isn't moved and the window isn't changed. However
> the buffer is left for the preview buffer just for a moment triggering
> a BufLeave event type.
>
> While I can just use :noautcmd pedit when opening the preview window
> manually to not trigger the event, if I'm using the 'preview' option
> in completeopt there doesn't seem to be a way to not trigger a
> BufLeave event when moving between the popup menu results that open
> the preview window.
> Any solutions to this?

What is the sequence of events in this case? I would expect a BufLeave
for the current window, a BufEnter for the preview window and then the
opposite, going back to the original window. This way there is a chance
to set things up in the preview window.

Does it happen differently?

If needed we could add a "opening preview window" flag somewhere.

--
Latest survey shows that 3 out of 4 people make up 75% of the
world's population.

/// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: