home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.2.084 < prev    next >
Encoding:
Internet Message Format  |  2003-09-10  |  1.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.084
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.2.084
  11. Problem:    "g_" in Visual mode always goes to the character after the line.
  12.         (Jean-Rene David)
  13. Solution:   Ignore the NUL at the end of the line.
  14. Files:        src/normal.c
  15.  
  16.  
  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
  19. ***************
  20. *** 6974,6979 ****
  21. --- 6974,6981 ----
  22.       break;
  23.   
  24.       case '_':
  25. +     /* "g_": to the last non-blank character in the line or <count> lines
  26. +      * downward. */
  27.       cap->oap->motion_type = MCHAR;
  28.       cap->oap->inclusive = TRUE;
  29.       curwin->w_curswant = MAXCOL;
  30. ***************
  31. *** 6984,6989 ****
  32. --- 6986,6996 ----
  33.       {
  34.           char_u  *ptr = ml_get_curline();
  35.   
  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;
  39. +         /* Decrease the cursor column until it's on a non-blank. */
  40.           while (curwin->w_cursor.col > 0
  41.                       && vim_iswhite(ptr[curwin->w_cursor.col]))
  42.           --curwin->w_cursor.col;
  43. *** ../vim-6.2.083/src/version.c    Thu Sep 11 21:15:02 2003
  44. --- src/version.c    Thu Sep 11 21:18:13 2003
  45. ***************
  46. *** 632,633 ****
  47. --- 632,635 ----
  48.   {   /* Add new patch number below this line */
  49. + /**/
  50. +     84,
  51.   /**/
  52.  
  53. -- 
  54. Why don't cannibals eat clowns?
  55. Because they taste funny.
  56.  
  57.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  58. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  59. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  60.  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
  61.