diff src/edit.c @ 978:0e3e208b4b90 v7.0.104

updated for version 7.0-104
author vimboss
date Thu, 14 Sep 2006 09:07:34 +0000
parents a157c4786b79
children e625dad74346
line wrap: on
line diff
--- a/src/edit.c
+++ b/src/edit.c
@@ -707,6 +707,11 @@ edit(cmdchar, startln, count)
 	lastc = c;			/* remember previous char for CTRL-D */
 	c = safe_vgetc();
 
+#ifdef FEAT_AUTOCMD
+	/* Don't want K_CURSORHOLD for the second key, e.g., after CTRL-V. */
+	did_cursorhold = TRUE;
+#endif
+
 #ifdef FEAT_RIGHTLEFT
 	if (p_hkmap && KeyTyped)
 	    c = hkmap(c);		/* Hebrew mode mapping */
@@ -1389,6 +1394,12 @@ normalchar:
 	    break;
 	}   /* end of switch (c) */
 
+#ifdef FEAT_AUTOCMD
+	/* If typed something may trigger CursorHoldI again. */
+	if (c != K_CURSORHOLD)
+	    did_cursorhold = FALSE;
+#endif
+
 	/* If the cursor was moved we didn't just insert a space */
 	if (arrow_used)
 	    inserted_space = FALSE;