vim-patch:7.4.633 #2526

Problem:    After 7.4.630 the problem persists.
Solution:   Also skip redo when calling a user function.

https://github.com/vim/vim/commit/v7-4-633
This commit is contained in:
Florian Walch 2015-04-28 12:57:20 +03:00 committed by Justin M. Keyes
parent 13e148687c
commit 6a8862ded4
2 changed files with 9 additions and 3 deletions

View File

@ -18913,6 +18913,7 @@ call_user_func (
char_u *name; char_u *name;
proftime_T wait_start; proftime_T wait_start;
proftime_T call_start; proftime_T call_start;
bool did_save_redo = false;
/* If depth of calling is getting too high, don't execute the function */ /* If depth of calling is getting too high, don't execute the function */
if (depth >= p_mfd) { if (depth >= p_mfd) {
@ -18924,7 +18925,10 @@ call_user_func (
++depth; ++depth;
// Save search patterns and redo buffer. // Save search patterns and redo buffer.
save_search_patterns(); save_search_patterns();
if (!ins_compl_active()) {
saveRedobuff(); saveRedobuff();
did_save_redo = true;
}
++fp->uf_calls; ++fp->uf_calls;
// check for CTRL-C hit // check for CTRL-C hit
line_breakcheck(); line_breakcheck();
@ -19239,7 +19243,9 @@ call_user_func (
func_free(fp); func_free(fp);
} }
// restore search patterns and redo buffer // restore search patterns and redo buffer
if (did_save_redo) {
restoreRedobuff(); restoreRedobuff();
}
restore_search_patterns(); restore_search_patterns();
} }

View File

@ -146,7 +146,7 @@ static int included_patches[] = {
636, 636,
//635, //635,
//634, //634,
//633, 633,
//632, //632,
//631, //631,
630, 630,