]> git.pld-linux.org Git - packages/vim.git/blob - 7.0.126
- new
[packages/vim.git] / 7.0.126
1 To: vim-dev@vim.org
2 Subject: Patch 7.0.126
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.0.126
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'.
14 Files:      src/edit.c
15
16
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
19 ***************
20 *** 5333,5340 ****
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)
26   #endif
27             internal_format(textwidth, second_indent, flags, c == NUL);
28       }
29 --- 5333,5348 ----
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;
34
35 !       if (*curbuf->b_p_fex != NUL)
36 !       {
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()
39 !            * was called. */
40 !           ins_need_undo = TRUE;
41 !       }
42 !       if (do_internal)
43   #endif
44             internal_format(textwidth, second_indent, flags, c == NUL);
45       }
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
48 ***************
49 *** 668,669 ****
50 --- 668,671 ----
51   {   /* Add new patch number below this line */
52 + /**/
53 +     126,
54   /**/
55
56 -- 
57 How To Keep A Healthy Level Of Insanity:
58 16. Have your coworkers address you by your wrestling name, Rock Hard Kim.
59
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    ///
This page took 0.032932 seconds and 3 git commands to generate.