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.
if (WIN_IS_POPUP(curwin))
// 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
call popup_show(id)
endif
endfunc
+
+ " Check that no autocommands are triggered for the info popup
+ au WinEnter * if win_gettype() == 'popup' | call setline(2, 'WinEnter') | endif
+ au WinLeave * if win_gettype() == 'popup' | call setline(2, 'WinLeave') | endif
END
return lines
endfunc