comparison src/popupmenu.c @ 22884:68dc849715b5 v8.2.1989

patch 8.2.1989: info popup triggers WinEnter and WinLeave autocommands Commit: https://github.com/vim/vim/commit/2dfae04f376a58d4c5a801cb652c8eae65900672 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 15 14:09:37 2020 +0100 patch 8.2.1989: info popup triggers WinEnter and WinLeave autocommands Problem: Info popup triggers WinEnter and WinLeave autocommands. Solution: Suppress autocommands for the info popup. (closes https://github.com/vim/vim/issues/7296)
author Bram Moolenaar <Bram@vim.org>
date Sun, 15 Nov 2020 14:15:04 +0100
parents 47f25a0c5a42
children 6145a1232c3a
comparison
equal deleted inserted replaced
22883:f786ab06aee7 22884:68dc849715b5
793 use_popup = USEPOPUP_HIDDEN; 793 use_popup = USEPOPUP_HIDDEN;
794 else if (strstr((char *)p_cot, "popup") != NULL) 794 else if (strstr((char *)p_cot, "popup") != NULL)
795 use_popup = USEPOPUP_NORMAL; 795 use_popup = USEPOPUP_NORMAL;
796 else 796 else
797 use_popup = USEPOPUP_NONE; 797 use_popup = USEPOPUP_NONE;
798 if (use_popup != USEPOPUP_NONE)
799 // don't use WinEnter or WinLeave autocommands for the info
800 // popup
801 block_autocmds();
798 # endif 802 # endif
799 // Open a preview window and set "curwin" to it. 803 // Open a preview window and set "curwin" to it.
800 // 3 lines by default, prefer 'previewheight' if set and smaller. 804 // 3 lines by default, prefer 'previewheight' if set and smaller.
801 g_do_tagpreview = 3; 805 g_do_tagpreview = 3;
802 if (p_pvh > 0 && p_pvh < g_do_tagpreview) 806 if (p_pvh > 0 && p_pvh < g_do_tagpreview)
971 # if defined(FEAT_PROP_POPUP) && defined(FEAT_QUICKFIX) 975 # if defined(FEAT_PROP_POPUP) && defined(FEAT_QUICKFIX)
972 if (WIN_IS_POPUP(curwin)) 976 if (WIN_IS_POPUP(curwin))
973 // can't keep focus in a popup window 977 // can't keep focus in a popup window
974 win_enter(firstwin, TRUE); 978 win_enter(firstwin, TRUE);
975 # endif 979 # endif
980 # ifdef FEAT_PROP_POPUP
981 if (use_popup != USEPOPUP_NONE)
982 unblock_autocmds();
983 # endif
976 } 984 }
977 #endif 985 #endif
978 } 986 }
979 #if defined(FEAT_PROP_POPUP) && defined(FEAT_QUICKFIX) 987 #if defined(FEAT_PROP_POPUP) && defined(FEAT_QUICKFIX)
980 if (!has_info) 988 if (!has_info)