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);
 
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index c85f0b6..cf6d00f 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -809,29 +809,7 @@
 }
 
 
-# if defined(FEAT_PROFILE) || defined(PROTO)
-/*
- * Functions for profiling.
- */
-static void script_do_profile __ARGS((scriptitem_T *si));
-static void script_dump_profile __ARGS((FILE *fd));
-static proftime_T prof_wait_time;
-
-/*
- * Set the time in "tm" to zero.
- */
-    void
-profile_zero(tm)
-    proftime_T *tm;
-{
-# ifdef WIN3264
-    tm->QuadPart = 0;
-# else
-    tm->tv_usec = 0;
-    tm->tv_sec = 0;
-# endif
-}
-
+# if defined(FEAT_PROFILE) || defined(FEAT_RELTIME) || defined(PROTO)
 /*
  * Store the current time in "tm".
  */
@@ -891,6 +869,52 @@
 }
 
 /*
+ * Return a string that represents the time in "tm".
+ * Uses a static buffer!
+ */
+    char *
+profile_msg(tm)
+    proftime_T *tm;
+{
+    static char buf[50];
+
+# ifdef WIN3264
+    LARGE_INTEGER   fr;
+
+    QueryPerformanceFrequency(&fr);
+    sprintf(buf, "%10.6lf", (double)tm->QuadPart / (double)fr.QuadPart);
+# else
+    sprintf(buf, "%3ld.%06ld", (long)tm->tv_sec, (long)tm->tv_usec);
+#endif
+    return buf;
+}
+
+# endif  /* FEAT_PROFILE || FEAT_RELTIME */
+
+# if defined(FEAT_PROFILE) || defined(PROTO)
+/*
+ * Functions for profiling.
+ */
+static void script_do_profile __ARGS((scriptitem_T *si));
+static void script_dump_profile __ARGS((FILE *fd));
+static proftime_T prof_wait_time;
+
+/*
+ * Set the time in "tm" to zero.
+ */
+    void
+profile_zero(tm)
+    proftime_T *tm;
+{
+# ifdef WIN3264
+    tm->QuadPart = 0;
+# else
+    tm->tv_usec = 0;
+    tm->tv_sec = 0;
+# endif
+}
+
+/*
  * Add the time "tm2" to "tm".
  */
     void
@@ -985,27 +1009,6 @@
 # endif
 }
 
-/*
- * Return a string that represents a time.
- * Uses a static buffer!
- */
-    char *
-profile_msg(tm)
-    proftime_T *tm;
-{
-    static char buf[50];
-
-# ifdef WIN3264
-    LARGE_INTEGER   fr;
-
-    QueryPerformanceFrequency(&fr);
-    sprintf(buf, "%10.6lf", (double)tm->QuadPart / (double)fr.QuadPart);
-# else
-    sprintf(buf, "%3ld.%06ld", (long)tm->tv_sec, (long)tm->tv_usec);
-#endif
-    return buf;
-}
-
 static char_u	*profile_fname = NULL;
 static proftime_T pause_time;
 
diff --git a/src/misc2.c b/src/misc2.c
index 6a34d33..004974a 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -5152,7 +5152,7 @@
 {
     return find_file_in_path_option(ptr, len, options, first,
 	    *curbuf->b_p_path == NUL ? p_path : curbuf->b_p_path,
-	    FALSE, rel_fname);
+	    FALSE, rel_fname, curbuf->b_p_sua);
 }
 
 static char_u	*ff_file_to_find = NULL;
@@ -5185,11 +5185,11 @@
     char_u	*rel_fname;	/* file name searching relative to */
 {
     return find_file_in_path_option(ptr, len, options, TRUE, p_cdpath,
-							     TRUE, rel_fname);
+					       TRUE, rel_fname, (char_u *)"");
 }
 
     char_u *
-find_file_in_path_option(ptr, len, options, first, path_option, need_dir, rel_fname)
+find_file_in_path_option(ptr, len, options, first, path_option, need_dir, rel_fname, suffixes)
     char_u	*ptr;		/* file name */
     int		len;		/* length of file name */
     int		options;
@@ -5197,6 +5197,7 @@
     char_u	*path_option;	/* p_path or p_cdpath */
     int		need_dir;	/* looking for directory name */
     char_u	*rel_fname;	/* file name we are looking relative to. */
+    char_u	*suffixes;	/* list of suffixes, 'suffixesadd' option */
 {
     static char_u	*dir;
     static int		did_findfile_init = FALSE;
@@ -5289,7 +5290,7 @@
 
 		/* When the file doesn't exist, try adding parts of
 		 * 'suffixesadd'. */
-		buf = curbuf->b_p_sua;
+		buf = suffixes;
 		for (;;)
 		{
 		    if (
diff --git a/src/undo.c b/src/undo.c
index 555d9e5..ed106c1 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -88,7 +88,7 @@
 static int u_savecommon __ARGS((linenr_T, linenr_T, linenr_T));
 static void u_doit __ARGS((int count));
 static void u_undoredo __ARGS((int undo));
-static void u_undo_end __ARGS((void));
+static void u_undo_end __ARGS((int did_undo));
 static void u_add_time __ARGS((char_u *buf, size_t buflen, time_t tt));
 static void u_freeheader __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp));
 static void u_freebranch __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp));
@@ -638,7 +638,7 @@
 	    curbuf->b_u_curhead = curbuf->b_u_curhead->uh_prev;
 	}
     }
-    u_undo_end();
+    u_undo_end(undo_undoes);
 }
 
 static int lastmark = 0;
@@ -669,6 +669,7 @@
     int		    round;
     int		    dosec = sec;
     int		    above = FALSE;
+    int		    did_undo = TRUE;
 
     /* First make sure the current undoable change is synced. */
     if (curbuf->b_u_synced == FALSE)
@@ -888,6 +889,7 @@
 	    if (uhp->uh_prev == NULL)
 		curbuf->b_u_newhead = uhp;
 	    curbuf->b_u_curhead = uhp->uh_prev;
+	    did_undo = FALSE;
 
 	    if (uhp->uh_seq == target)	/* found it! */
 		break;
@@ -901,7 +903,7 @@
 	    }
 	}
     }
-    u_undo_end();
+    u_undo_end(did_undo);
 }
 
 /*
@@ -1174,7 +1176,8 @@
  * in some cases, but it's better than nothing).
  */
     static void
-u_undo_end()
+u_undo_end(did_undo)
+    int		did_undo;	/* just did an undo */
 {
     char	*msg;
     u_header_T	*uhp;
@@ -1211,7 +1214,12 @@
     }
 
     if (curbuf->b_u_curhead != NULL)
-	uhp = curbuf->b_u_curhead;
+    {
+	if (did_undo)
+	    uhp = curbuf->b_u_curhead;
+	else
+	    uhp = curbuf->b_u_curhead->uh_next;
+    }
     else
 	uhp = curbuf->b_u_newhead;
 
@@ -1220,9 +1228,12 @@
     else
 	u_add_time(msgbuf, sizeof(msgbuf), uhp->uh_time);
 
-    smsg((char_u *)_("%ld %s; #%ld  %s"),
+    smsg((char_u *)_("%ld %s; %s #%ld  %s"),
 	    u_oldcount < 0 ? -u_oldcount : u_oldcount,
-	    _(msg), uhp == NULL ? 0L : uhp->uh_seq, msgbuf);
+	    _(msg),
+	    did_undo ? _("before") : _("after"),
+	    uhp == NULL ? 0L : uhp->uh_seq,
+	    msgbuf);
 }
 
 /*
diff --git a/src/version.h b/src/version.h
index ee1532b..6ba548b 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
 #define VIM_VERSION_NODOT	"vim70aa"
 #define VIM_VERSION_SHORT	"7.0aa"
 #define VIM_VERSION_MEDIUM	"7.0aa ALPHA"
-#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 20)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 20, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 21)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 21, compiled "