Karsten Hopp 2b10d8
To: vim-dev@vim.org
Karsten Hopp 2b10d8
Subject: patch 7.1.023
Karsten Hopp 2b10d8
Fcc: outbox
Karsten Hopp 2b10d8
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 2b10d8
Mime-Version: 1.0
Karsten Hopp 2b10d8
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 2b10d8
Content-Transfer-Encoding: 8bit
Karsten Hopp 2b10d8
------------
Karsten Hopp 2b10d8
Karsten Hopp 2b10d8
Patch 7.1.023
Karsten Hopp 2b10d8
Problem:    "dw" in a line with one character deletes the line.  Vi and nvi
Karsten Hopp 2b10d8
	    don't do this.  (Kjell Arne Rekaa)
Karsten Hopp 2b10d8
Solution:   Check for one-character words especially.
Karsten Hopp 2b10d8
Files:	    src/search.c
Karsten Hopp 2b10d8
Karsten Hopp 2b10d8
Karsten Hopp 2b10d8
*** ../vim-7.1.022/src/search.c	Tue Jun 19 12:58:55 2007
Karsten Hopp 2b10d8
--- src/search.c	Thu Jul  5 21:18:55 2007
Karsten Hopp 2b10d8
***************
Karsten Hopp 2b10d8
*** 2795,2801 ****
Karsten Hopp 2b10d8
  	i = inc_cursor();
Karsten Hopp 2b10d8
  	if (i == -1 || (i >= 1 && last_line)) /* started at last char in file */
Karsten Hopp 2b10d8
  	    return FAIL;
Karsten Hopp 2b10d8
! 	if (i == 1 && eol && count == 0)      /* started at last char in line */
Karsten Hopp 2b10d8
  	    return OK;
Karsten Hopp 2b10d8
  
Karsten Hopp 2b10d8
  	/*
Karsten Hopp 2b10d8
--- 2802,2808 ----
Karsten Hopp 2b10d8
  	i = inc_cursor();
Karsten Hopp 2b10d8
  	if (i == -1 || (i >= 1 && last_line)) /* started at last char in file */
Karsten Hopp 2b10d8
  	    return FAIL;
Karsten Hopp 2b10d8
! 	if (i >= 1 && eol && count == 0)      /* started at last char in line */
Karsten Hopp 2b10d8
  	    return OK;
Karsten Hopp 2b10d8
  
Karsten Hopp 2b10d8
  	/*
Karsten Hopp 2b10d8
*** ../vim-7.1.022/src/version.c	Sat Jul  7 13:57:39 2007
Karsten Hopp 2b10d8
--- src/version.c	Tue Jul 10 12:35:36 2007
Karsten Hopp 2b10d8
***************
Karsten Hopp 2b10d8
*** 668,669 ****
Karsten Hopp 2b10d8
--- 668,671 ----
Karsten Hopp 2b10d8
  {   /* Add new patch number below this line */
Karsten Hopp 2b10d8
+ /**/
Karsten Hopp 2b10d8
+     23,
Karsten Hopp 2b10d8
  /**/
Karsten Hopp 2b10d8
Karsten Hopp 2b10d8
-- 
Karsten Hopp 2b10d8
BRIDGEKEEPER: What is your favorite editor?
Karsten Hopp 2b10d8
GAWAIN:       Emacs ...  No, Viiiiiiiiiiimmmmmmm!
Karsten Hopp 2b10d8
           "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD
Karsten Hopp 2b10d8
Karsten Hopp 2b10d8
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 2b10d8
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 2b10d8
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 2b10d8
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///