]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.395
- new
[packages/vim.git] / 7.3.395
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.395
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.395 (after 7.3.251)
11 Problem:    "dv?bar" in the last line deletes too much and breaks undo.
12 Solution:   Only adjust the cursor position when it's after the last line of
13             the buffer.  Add a test. (Christian Brabandt)
14 Files:      src/ops.c, src/testdir/test43.in, src/testdir/test43.ok
15
16
17 *** ../vim-7.3.394/src/ops.c    2011-09-21 17:33:49.000000000 +0200
18 --- src/ops.c   2012-01-10 13:28:05.000000000 +0100
19 ***************
20 *** 1961,1968 ****
21                 /* Special case: gH<Del> deletes the last line. */
22                 del_lines(1L, FALSE);
23                 curwin->w_cursor = curpos;      /* restore curwin->w_cursor */
24 !               if (curwin->w_cursor.lnum > 1)
25 !                   --curwin->w_cursor.lnum;
26             }
27             else
28             {
29 --- 1962,1969 ----
30                 /* Special case: gH<Del> deletes the last line. */
31                 del_lines(1L, FALSE);
32                 curwin->w_cursor = curpos;      /* restore curwin->w_cursor */
33 !               if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
34 !                   curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
35             }
36             else
37             {
38 ***************
39 *** 4434,4440 ****
40   #endif
41   
42   /*
43 !  * implementation of the format operator 'gq'
44    */
45       void
46   op_format(oap, keep_cursor)
47 --- 4435,4441 ----
48   #endif
49   
50   /*
51 !  * Implementation of the format operator 'gq'.
52    */
53       void
54   op_format(oap, keep_cursor)
55 *** ../vim-7.3.394/src/testdir/test43.in        2010-08-15 21:57:29.000000000 +0200
56 --- src/testdir/test43.in       2012-01-10 13:41:13.000000000 +0100
57 ***************
58 *** 13,19 ****
59   x:set magic
60   /\v(a)(b)\2\1\1/e
61   x/\V[ab]\(\[xy]\)\1
62 ! x:?^1?,$w! test.out
63   :qa!
64   ENDTEST
65   
66 --- 13,23 ----
67   x:set magic
68   /\v(a)(b)\2\1\1/e
69   x/\V[ab]\(\[xy]\)\1
70 ! x:$
71 ! :set undolevels=100
72 ! dv?bar?
73 ! Yup:"
74 ! :?^1?,$w! test.out
75   :qa!
76   ENDTEST
77   
78 ***************
79 *** 25,27 ****
80 --- 29,33 ----
81   6 x ^aa$ x
82   7 (a)(b) abbaa
83   8 axx [ab]xx
84 + 9 foobar
85
86 *** ../vim-7.3.394/src/testdir/test43.ok        2010-08-15 21:57:29.000000000 +0200
87 --- src/testdir/test43.ok       2012-01-10 13:42:39.000000000 +0100
88 ***************
89 *** 6,8 ****
90 --- 6,11 ----
91   6 x aa$ x
92   7 (a)(b) abba
93   8 axx ab]xx
94 + 9 foobar
95 + 9 foo
96
97 *** ../vim-7.3.394/src/version.c        2012-01-10 12:42:05.000000000 +0100
98 --- src/version.c       2012-01-10 13:30:40.000000000 +0100
99 ***************
100 *** 716,717 ****
101 --- 716,719 ----
102   {   /* Add new patch number below this line */
103 + /**/
104 +     395,
105   /**/
106
107 -- 
108 The Law, in its majestic equality, forbids the rich, as well as the
109 poor, to sleep under the bridges, to beg in the streets, and to steal
110 bread.                       -- Anatole France
111
112  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
113 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
114 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
115  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.044163 seconds and 3 git commands to generate.