changeset 6608:a5ba0921efcb v7.4.630

updated for version 7.4.630 Problem: When using Insert mode completion combined with autocommands the redo command may not work. Solution: Do not save the redo buffer when executing autocommands. (Yasuhiro Matsumoto)
author Bram Moolenaar <bram@vim.org>
date Tue, 17 Feb 2015 10:58:25 +0100
parents eaf81729ef02
children 426b000da476
files src/fileio.c src/version.c
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -9230,6 +9230,7 @@ apply_autocmds_group(event, fname, fname
 #ifdef FEAT_PROFILE
     proftime_T	wait_time;
 #endif
+    int		did_save_redobuff = FALSE;
 
     /*
      * Quickly return if there are no autocommands for this event or
@@ -9430,7 +9431,11 @@ apply_autocmds_group(event, fname, fname
     if (!autocmd_busy)
     {
 	save_search_patterns();
-	saveRedobuff();
+	if (!ins_compl_active())
+	{
+	    saveRedobuff();
+	    did_save_redobuff = TRUE;
+	}
 	did_filetype = keep_filetype;
     }
 
@@ -9530,7 +9535,8 @@ apply_autocmds_group(event, fname, fname
     if (!autocmd_busy)
     {
 	restore_search_patterns();
-	restoreRedobuff();
+	if (did_save_redobuff)
+	    restoreRedobuff();
 	did_filetype = FALSE;
 	while (au_pending_free_buf != NULL)
 	{
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    630,
+/**/
     629,
 /**/
     628,