0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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)
This commit is contained in:
Bram Moolenaar
2015-02-17 10:58:25 +01:00
parent 98f52500b6
commit c51b02d7d9
2 changed files with 10 additions and 2 deletions

View 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)
{