# HG changeset patch # User vimboss # Date 1160488150 0 # Node ID cb49fa8c71963b7b69529dfc2abd00b791119fd6 # Parent 2787b8483e6498f536e66ac134a073246ab6f5e4 updated for version 7.0-126 diff --git a/src/edit.c b/src/edit.c --- a/src/edit.c +++ b/src/edit.c @@ -5333,8 +5333,16 @@ insertchar(c, flags, second_indent) /* Format with 'formatexpr' when it's set. Use internal formatting * when 'formatexpr' isn't set or it returns non-zero. */ #if defined(FEAT_EVAL) - if (*curbuf->b_p_fex == NUL - || fex_format(curwin->w_cursor.lnum, 1L, c) != 0) + int do_internal = TRUE; + + if (*curbuf->b_p_fex != NUL) + { + do_internal = (fex_format(curwin->w_cursor.lnum, 1L, c) != 0); + /* It may be required to save for undo again, e.g. when setline() + * was called. */ + ins_need_undo = TRUE; + } + if (do_internal) #endif internal_format(textwidth, second_indent, flags, c == NUL); } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 126, +/**/ 125, /**/ 124,