updated for version 7.0231
diff --git a/src/edit.c b/src/edit.c
index 898f923..c22bb39 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1390,9 +1390,14 @@
if (!char_avail())
{
#ifdef FEAT_AUTOCMD
- /* Trigger CursorMoved if the cursor moved. */
+ /* Trigger CursorMoved if the cursor moved. Not when the popup menu is
+ * visible, the command might delete it. */
if (ready && has_cursormovedI()
- && !equalpos(last_cursormoved, curwin->w_cursor))
+ && !equalpos(last_cursormoved, curwin->w_cursor)
+# ifdef FEAT_INS_EXPAND
+ && !pum_visible()
+# endif
+ )
{
apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
last_cursormoved = curwin->w_cursor;
@@ -2460,6 +2465,11 @@
if (!pum_wanted() || !pum_enough_matches())
return;
+#if defined(FEAT_EVAL)
+ /* Dirty hard-coded hack: remove any matchparen highlighting. */
+ do_cmdline_cmd((char_u *)"if exists('g:loaded_matchparen')|3match none|endif");
+#endif
+
/* Update the screen before drawing the popup menu over it. */
update_screen(0);