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