]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.4.630 v7.4.630
authorBram Moolenaar <Bram@vim.org>
Tue, 17 Feb 2015 09:58:25 +0000 (10:58 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 17 Feb 2015 09:58:25 +0000 (10:58 +0100)
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)

src/fileio.c
src/version.c

index 0fa0fc8e09f18c70c7b80f3ca3e91a0e26e00efe..47814fab9a0708fde61ee0be8c95c3238f93f6e3 100644 (file)
@@ -9230,6 +9230,7 @@ apply_autocmds_group(event, fname, fname_io, force, group, buf, eap)
 #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_io, force, group, buf, eap)
     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_io, force, group, buf, eap)
     if (!autocmd_busy)
     {
        restore_search_patterns();
-       restoreRedobuff();
+       if (did_save_redobuff)
+           restoreRedobuff();
        did_filetype = FALSE;
        while (au_pending_free_buf != NULL)
        {
index c0684b09b3e6e4d6f3ec9638e90162d5c2ec72cb..4fb12302cba1b18d06c4d99250652d6c315f224d 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    630,
 /**/
     629,
 /**/