diff options
author | Bram Moolenaar <bram@vim.org> | 2015-02-17 10:58:25 +0100 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2015-02-17 10:58:25 +0100 |
commit | d6aa729cdda0b3a6c4e3ba2a44a48e0acc7b7751 (patch) | |
tree | 26cec4ef19232d5da2986905122ae40b96759ffd | |
parent | 33a79e1213f1c2f0f33b3a1ab3145abd81922f5c (diff) | |
download | vim-d6aa729cdda0b3a6c4e3ba2a44a48e0acc7b7751.tar.gz |
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)
-rw-r--r-- | src/fileio.c | 10 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index 0fa0fc8e..47814fab 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -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) { diff --git a/src/version.c b/src/version.c index c0684b09..4fb12302 100644 --- 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, |