Monday, October 19, 2015

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

On Monday, October 19, 2015 at 2:59:39 AM UTC+2, Bram Moolenaar wrote:

> Does it happen differently?

No, exactly as you said. But I would argue that there should be way to "mute"
the "BufLeave" and "BufEnter" events (and corresponding ones when coming back from the
preview window) when using the popup menu, since we're actually coming back to
the buffer that initiated the preview window opening immediately.
I can do this with :noautocmd ptag when opening the the preview window manually, but
not when using the preview option in the popup menu.

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

That would be useful for many use cases, and in my opinion should be implemented.
However I'm not sure it would solve my specific use case, since I'd still want to differentiate
when I'm entering the preview "manually" (switching to the preview window and take a look around)
when I want a BufLeave to be triggered, and when using the popup menu.


--
--
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:

Post a Comment