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 / 7.1 / 7.1.286 < prev    next >
Encoding:
Internet Message Format  |  2008-03-31  |  2.0 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.1.286
  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 7.1.286 (after 7.1.103)
  11. Problem:    "w" at the end of the buffer moves the cursor past the end of the
  12.         line. (Markus Heidelberg)
  13. Solution:   Move the cursor back from the NUL when it was moved forward.
  14. Files:        src/normal.c
  15.  
  16.  
  17. *** ../vim-7.1.285/src/normal.c    Sat Jan 19 15:55:51 2008
  18. --- src/normal.c    Wed Mar 19 20:33:44 2008
  19. ***************
  20. *** 8345,8350 ****
  21. --- 8345,8351 ----
  22.       int        n;
  23.       int        word_end;
  24.       int        flag = FALSE;
  25. +     pos_T    startpos = curwin->w_cursor;
  26.   
  27.       /*
  28.        * Set inclusive for the "E" and "e" command.
  29. ***************
  30. *** 8405,8412 ****
  31.       else
  32.       n = fwd_word(cap->count1, cap->arg, cap->oap->op_type != OP_NOP);
  33.   
  34. !     /* Don't leave the cursor on the NUL past the end of line. */
  35. !     if (n != FAIL)
  36.       adjust_cursor(cap->oap);
  37.   
  38.       if (n == FAIL && cap->oap->op_type == OP_NOP)
  39. --- 8406,8414 ----
  40.       else
  41.       n = fwd_word(cap->count1, cap->arg, cap->oap->op_type != OP_NOP);
  42.   
  43. !     /* Don't leave the cursor on the NUL past the end of line. Unless we
  44. !      * didn't move it forward. */
  45. !     if (lt(startpos, curwin->w_cursor))
  46.       adjust_cursor(cap->oap);
  47.   
  48.       if (n == FAIL && cap->oap->op_type == OP_NOP)
  49. *** ../vim-7.1.285/src/version.c    Thu Mar 20 14:38:58 2008
  50. --- src/version.c    Tue Apr  1 12:04:54 2008
  51. ***************
  52. *** 668,669 ****
  53. --- 668,671 ----
  54.   {   /* Add new patch number below this line */
  55. + /**/
  56. +     286,
  57.   /**/
  58.  
  59. -- 
  60. hundred-and-one symptoms of being an internet addict:
  61. 200. You really believe in the concept of a "paperless" office.
  62.  
  63.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  64. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  65. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  66.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  67.