4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Crash when deleting backwards over a line break in Insert mode.
12 Solution: Don't advance the cursor when it's already on the NUL after a
13 line. (Matthew Wozniski)
17 *** ../vim-7.1.183/src/normal.c Sun Oct 14 17:15:45 2007
18 --- src/normal.c Tue Jan 1 16:40:24 2008
21 /* When the NL before the first char has to be deleted we
22 * put the cursor on the NUL after the previous line.
23 * This is a very special case, be careful!
24 ! * don't adjust op_end now, otherwise it won't work */
25 if ( (cap->oap->op_type == OP_DELETE
26 || cap->oap->op_type == OP_CHANGE)
27 && !lineempty(curwin->w_cursor.lnum))
29 ! ++curwin->w_cursor.col;
30 cap->retval |= CA_NO_ADJ_OP_END;
34 /* When the NL before the first char has to be deleted we
35 * put the cursor on the NUL after the previous line.
36 * This is a very special case, be careful!
37 ! * Don't adjust op_end now, otherwise it won't work. */
38 if ( (cap->oap->op_type == OP_DELETE
39 || cap->oap->op_type == OP_CHANGE)
40 && !lineempty(curwin->w_cursor.lnum))
42 ! if (*ml_get_cursor() != NUL)
43 ! ++curwin->w_cursor.col;
44 cap->retval |= CA_NO_ADJ_OP_END;
47 *** ../vim-7.1.183/src/version.c Wed Jan 2 15:34:48 2008
48 --- src/version.c Wed Jan 2 16:24:19 2008
52 { /* Add new patch number below this line */
58 Not too long ago, cut and paste was done with scissors and glue...
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 ///