1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
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
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
21 /* Special case: gH<Del> deletes the last line. */
23 curwin->w_cursor = curpos; /* restore curwin->w_cursor */
24 ! if (curwin->w_cursor.lnum > 1)
25 ! --curwin->w_cursor.lnum;
30 /* Special case: gH<Del> deletes the last line. */
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;
43 ! * implementation of the format operator 'gq'
46 op_format(oap, keep_cursor)
51 ! * Implementation of the format operator 'gq'.
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
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
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
102 { /* Add new patch number below this line */
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
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 ///