diff options
author | vimboss <devnull@localhost> | 2006-10-10 13:49:10 +0000 |
---|---|---|
committer | vimboss <devnull@localhost> | 2006-10-10 13:49:10 +0000 |
commit | b9af2da129040c9695ff2867facac54a8e4f0a0e (patch) | |
tree | dd9068f7d53c0510a38e7237ff3c3e03590811d9 | |
parent | 57585797e2ce6b241752a6989e6a7d03c1270ab0 (diff) | |
download | vim-b9af2da129040c9695ff2867facac54a8e4f0a0e.tar.gz |
-rw-r--r-- | src/edit.c | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 12 insertions, 2 deletions
@@ -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 index 6ff099e9..5c568524 100644 --- 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, |