Loading ...
Sorry, an error occurred while loading the content.

Patch 7.1.286

Expand Messages
  • Bram Moolenaar
    Patch 7.1.286 (after 7.1.103) Problem: w at the end of the buffer moves the cursor past the end of the line. (Markus Heidelberg) Solution: Move the
    Message 1 of 1 , Apr 1, 2008
    • 0 Attachment
      Patch 7.1.286 (after 7.1.103)
      Problem: "w" at the end of the buffer moves the cursor past the end of the
      line. (Markus Heidelberg)
      Solution: Move the cursor back from the NUL when it was moved forward.
      Files: src/normal.c


      *** ../vim-7.1.285/src/normal.c Sat Jan 19 15:55:51 2008
      --- src/normal.c Wed Mar 19 20:33:44 2008
      ***************
      *** 8345,8350 ****
      --- 8345,8351 ----
      int n;
      int word_end;
      int flag = FALSE;
      + pos_T startpos = curwin->w_cursor;

      /*
      * Set inclusive for the "E" and "e" command.
      ***************
      *** 8405,8412 ****
      else
      n = fwd_word(cap->count1, cap->arg, cap->oap->op_type != OP_NOP);

      ! /* Don't leave the cursor on the NUL past the end of line. */
      ! if (n != FAIL)
      adjust_cursor(cap->oap);

      if (n == FAIL && cap->oap->op_type == OP_NOP)
      --- 8406,8414 ----
      else
      n = fwd_word(cap->count1, cap->arg, cap->oap->op_type != OP_NOP);

      ! /* Don't leave the cursor on the NUL past the end of line. Unless we
      ! * didn't move it forward. */
      ! if (lt(startpos, curwin->w_cursor))
      adjust_cursor(cap->oap);

      if (n == FAIL && cap->oap->op_type == OP_NOP)
      *** ../vim-7.1.285/src/version.c Thu Mar 20 14:38:58 2008
      --- src/version.c Tue Apr 1 12:04:54 2008
      ***************
      *** 668,669 ****
      --- 668,671 ----
      { /* Add new patch number below this line */
      + /**/
      + 286,
      /**/

      --
      hundred-and-one symptoms of being an internet addict:
      200. You really believe in the concept of a "paperless" office.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ download, build and distribute -- http://www.A-A-P.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.