4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: "g_" in Visual mode always goes to the character after the line.
13 Solution: Ignore the NUL at the end of the line.
17 *** ../vim-6.2.083/src/normal.c Mon Jun 2 22:20:28 2003
18 --- src/normal.c Sun Sep 7 23:26:22 2003
25 + /* "g_": to the last non-blank character in the line or <count> lines
27 cap->oap->motion_type = MCHAR;
28 cap->oap->inclusive = TRUE;
29 curwin->w_curswant = MAXCOL;
34 char_u *ptr = ml_get_curline();
36 + /* In Visual mode we may end up after the line. */
37 + if (curwin->w_cursor.col > 0 && ptr[curwin->w_cursor.col] == NUL)
38 + --curwin->w_cursor.col;
40 + /* Decrease the cursor column until it's on a non-blank. */
41 while (curwin->w_cursor.col > 0
42 && vim_iswhite(ptr[curwin->w_cursor.col]))
43 --curwin->w_cursor.col;
44 *** ../vim-6.2.083/src/version.c Thu Sep 11 21:15:02 2003
45 --- src/version.c Thu Sep 11 21:18:13 2003
49 { /* Add new patch number below this line */
55 Why don't cannibals eat clowns?
56 Because they taste funny.
58 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
59 /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
60 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
61 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///