diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-11-15 14:09:37 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-11-15 14:09:37 +0100 |
commit | 2dfae04f376a58d4c5a801cb652c8eae65900672 (patch) | |
tree | 0fecb80c5ceb9c7991461859625ea3ae95c13f59 /src/popupmenu.c | |
parent | e41decc892a115335259096c3bc0204dd99b372b (diff) | |
download | vim-git-2dfae04f376a58d4c5a801cb652c8eae65900672.tar.gz |
patch 8.2.1989: info popup triggers WinEnter and WinLeave autocommandsv8.2.1989
Problem: Info popup triggers WinEnter and WinLeave autocommands.
Solution: Suppress autocommands for the info popup. (closes #7296)
Diffstat (limited to 'src/popupmenu.c')
-rw-r--r-- | src/popupmenu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/popupmenu.c b/src/popupmenu.c index 279a68d7a..8033d7211 100644 --- a/src/popupmenu.c +++ b/src/popupmenu.c @@ -795,6 +795,10 @@ pum_set_selected(int n, int repeat UNUSED) use_popup = USEPOPUP_NORMAL; else use_popup = USEPOPUP_NONE; + if (use_popup != USEPOPUP_NONE) + // don't use WinEnter or WinLeave autocommands for the info + // popup + block_autocmds(); # endif // Open a preview window and set "curwin" to it. // 3 lines by default, prefer 'previewheight' if set and smaller. @@ -973,6 +977,10 @@ pum_set_selected(int n, int repeat UNUSED) // can't keep focus in a popup window win_enter(firstwin, TRUE); # endif +# ifdef FEAT_PROP_POPUP + if (use_popup != USEPOPUP_NONE) + unblock_autocmds(); +# endif } #endif } |