99b86a7
To: vim-dev@vim.org
99b86a7
Subject: patch 7.1.103
99b86a7
Fcc: outbox
99b86a7
From: Bram Moolenaar <Bram@moolenaar.net>
99b86a7
Mime-Version: 1.0
99b86a7
Content-Type: text/plain; charset=ISO-8859-1
99b86a7
Content-Transfer-Encoding: 8bit
99b86a7
------------
99b86a7
99b86a7
Patch 7.1.103
99b86a7
Problem:    Using "dw" with the cursor past the end of the last line (using
99b86a7
            CTRL-\ CTRL-O from Insert mode) deletes a character. (Tim Chase)
99b86a7
Solution:   Don't move the cursor back when the movement failed.
99b86a7
Files:      src/normal.c
99b86a7
99b86a7
99b86a7
*** ../vim-7.1.102/src/normal.c	Tue Aug 14 22:54:00 2007
99b86a7
--- src/normal.c	Tue Sep 11 19:32:42 2007
99b86a7
***************
99b86a7
*** 8364,8370 ****
99b86a7
  	n = fwd_word(cap->count1, cap->arg, cap->oap->op_type != OP_NOP);
99b86a7
  
99b86a7
      /* Don't leave the cursor on the NUL past a line */
99b86a7
!     if (curwin->w_cursor.col && gchar_cursor() == NUL)
99b86a7
      {
99b86a7
  	--curwin->w_cursor.col;
99b86a7
  	cap->oap->inclusive = TRUE;
99b86a7
--- 8364,8370 ----
99b86a7
  	n = fwd_word(cap->count1, cap->arg, cap->oap->op_type != OP_NOP);
99b86a7
  
99b86a7
      /* Don't leave the cursor on the NUL past a line */
99b86a7
!     if (n != FAIL && curwin->w_cursor.col > 0 && gchar_cursor() == NUL)
99b86a7
      {
99b86a7
  	--curwin->w_cursor.col;
99b86a7
  	cap->oap->inclusive = TRUE;
99b86a7
*** ../vim-7.1.102/src/version.c	Thu Sep 13 15:19:32 2007
99b86a7
--- src/version.c	Thu Sep 13 15:32:05 2007
99b86a7
***************
99b86a7
*** 668,669 ****
99b86a7
--- 668,671 ----
99b86a7
  {   /* Add new patch number below this line */
99b86a7
+ /**/
99b86a7
+     103,
99b86a7
  /**/
99b86a7
99b86a7
-- 
99b86a7
ARTHUR:  Then who is your lord?
99b86a7
WOMAN:   We don't have a lord.
99b86a7
ARTHUR:  What?
99b86a7
DENNIS:  I told you.  We're an anarcho-syndicalist commune.  We take it in
99b86a7
         turns to act as a sort of executive officer for the week.
99b86a7
                                  The Quest for the Holy Grail (Monty Python)
99b86a7
99b86a7
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
99b86a7
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
99b86a7
\\\        download, build and distribute -- http://www.A-A-P.org        ///
99b86a7
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///