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