4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: When using multi-byte characters the combination of completion and
12 formatting may result in a wrong cursor position.
13 Solution: Don't decrement the cursor column, use dec_cursor(). (Yukihiro
14 Nakadaira) Also check for the column to be zero.
18 *** ../vim-7.0.198/src/edit.c Sun Feb 4 02:37:40 2007
19 --- src/edit.c Fri Feb 16 01:15:49 2007
25 /* put the cursor on the last char, for 'tw' formatting */
26 ! curwin->w_cursor.col--;
27 if (stop_arrow() == OK)
28 insertchar(NUL, 0, -1);
29 ! curwin->w_cursor.col++;
32 auto_format(FALSE, TRUE);
37 + int prev_col = curwin->w_cursor.col;
39 /* put the cursor on the last char, for 'tw' formatting */
42 if (stop_arrow() == OK)
43 insertchar(NUL, 0, -1);
45 ! && ml_get_curline()[curwin->w_cursor.col] != NUL)
49 auto_format(FALSE, TRUE);
50 *** ../vim-7.0.198/src/version.c Tue Feb 20 03:18:20 2007
51 --- src/version.c Tue Feb 20 03:32:12 2007
55 { /* Add new patch number below this line */
61 hundred-and-one symptoms of being an internet addict:
62 156. You forget your friend's name but not her e-mail address.
64 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
65 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
66 \\\ download, build and distribute -- http://www.A-A-P.org ///
67 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///