4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: When 'formatexpr' uses setline() and later internal formatting is
12 used undo information is not correct. (Jiri Cerny, Benji Fisher)
13 Solution: Set ins_need_undo after using 'formatexpr'.
17 *** ../vim-7.0.125/src/edit.c Fri Oct 6 20:39:58 2006
18 --- src/edit.c Tue Oct 10 12:46:04 2006
21 /* Format with 'formatexpr' when it's set. Use internal formatting
22 * when 'formatexpr' isn't set or it returns non-zero. */
23 #if defined(FEAT_EVAL)
24 ! if (*curbuf->b_p_fex == NUL
25 ! || fex_format(curwin->w_cursor.lnum, 1L, c) != 0)
27 internal_format(textwidth, second_indent, flags, c == NUL);
30 /* Format with 'formatexpr' when it's set. Use internal formatting
31 * when 'formatexpr' isn't set or it returns non-zero. */
32 #if defined(FEAT_EVAL)
33 ! int do_internal = TRUE;
35 ! if (*curbuf->b_p_fex != NUL)
37 ! do_internal = (fex_format(curwin->w_cursor.lnum, 1L, c) != 0);
38 ! /* It may be required to save for undo again, e.g. when setline()
40 ! ins_need_undo = TRUE;
44 internal_format(textwidth, second_indent, flags, c == NUL);
46 *** ../vim-7.0.125/src/version.c Tue Oct 10 13:27:30 2006
47 --- src/version.c Tue Oct 10 15:47:20 2006
51 { /* Add new patch number below this line */
57 How To Keep A Healthy Level Of Insanity:
58 16. Have your coworkers address you by your wrestling name, Rock Hard Kim.
60 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
61 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
62 \\\ download, build and distribute -- http://www.A-A-P.org ///
63 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///