Skip to content

How to exit visual mode after mounting Menu? #65

Answered by MunifTanjim
mattleong asked this question in Q&A
Discussion options

You must be logged in to vote

Which, makes sense because autocmd for the buffer has already fired by the time we get to the second line below. Or at least, that is my assumption.

Yes, you're absolutely right.

When trying to register the event handler before mounting, I am met with a wall of errors.

Same reason as above. Mapping is done on the buffer, but before mounting the buffer does not exist yet.

The reason I came about this was actually based on another "bug", which is that if a popup opens while the previous buffer was in visual mode, the popup will also render starting in visual mode. Which is obviously not ideal for a menu picker.
What would be the best way to either have this even properly catch for the …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by MunifTanjim
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #60 on December 10, 2021 09:07.