Karsten Hopp e6bc0d
To: vim_dev@googlegroups.com
Karsten Hopp e6bc0d
Subject: Patch 7.3.425
Karsten Hopp e6bc0d
Fcc: outbox
Karsten Hopp e6bc0d
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp e6bc0d
Mime-Version: 1.0
Karsten Hopp e6bc0d
Content-Type: text/plain; charset=UTF-8
Karsten Hopp e6bc0d
Content-Transfer-Encoding: 8bit
Karsten Hopp e6bc0d
------------
Karsten Hopp e6bc0d
Karsten Hopp e6bc0d
Patch 7.3.425 (after 7.3.265)
Karsten Hopp e6bc0d
Problem:    Search history lines are duplicated. (Edwin Steiner)
Karsten Hopp e6bc0d
Solution:   Convert separator character from space to NUL.
Karsten Hopp e6bc0d
Files:      src/ex_getln.c
Karsten Hopp e6bc0d
Karsten Hopp e6bc0d
Karsten Hopp e6bc0d
*** ../vim-7.3.424/src/ex_getln.c	2012-01-26 13:01:54.000000000 +0100
Karsten Hopp e6bc0d
--- src/ex_getln.c	2012-02-04 22:27:43.000000000 +0100
Karsten Hopp e6bc0d
***************
Karsten Hopp e6bc0d
*** 6027,6034 ****
Karsten Hopp e6bc0d
  	val = viminfo_readstring(virp, 1, TRUE);
Karsten Hopp e6bc0d
  	if (val != NULL && *val != NUL)
Karsten Hopp e6bc0d
  	{
Karsten Hopp e6bc0d
  	    if (!in_history(type, val + (type == HIST_SEARCH),
Karsten Hopp e6bc0d
! 						  viminfo_add_at_front, *val))
Karsten Hopp e6bc0d
  	    {
Karsten Hopp e6bc0d
  		/* Need to re-allocate to append the separator byte. */
Karsten Hopp e6bc0d
  		len = STRLEN(val);
Karsten Hopp e6bc0d
--- 6027,6036 ----
Karsten Hopp e6bc0d
  	val = viminfo_readstring(virp, 1, TRUE);
Karsten Hopp e6bc0d
  	if (val != NULL && *val != NUL)
Karsten Hopp e6bc0d
  	{
Karsten Hopp e6bc0d
+ 	    int sep = (*val == ' ' ? NUL : *val);
Karsten Hopp e6bc0d
+ 
Karsten Hopp e6bc0d
  	    if (!in_history(type, val + (type == HIST_SEARCH),
Karsten Hopp e6bc0d
! 						   viminfo_add_at_front, sep))
Karsten Hopp e6bc0d
  	    {
Karsten Hopp e6bc0d
  		/* Need to re-allocate to append the separator byte. */
Karsten Hopp e6bc0d
  		len = STRLEN(val);
Karsten Hopp e6bc0d
***************
Karsten Hopp e6bc0d
*** 6040,6046 ****
Karsten Hopp e6bc0d
  			/* Search entry: Move the separator from the first
Karsten Hopp e6bc0d
  			 * column to after the NUL. */
Karsten Hopp e6bc0d
  			mch_memmove(p, val + 1, (size_t)len);
Karsten Hopp e6bc0d
! 			p[len] = (*val == ' ' ? NUL : *val);
Karsten Hopp e6bc0d
  		    }
Karsten Hopp e6bc0d
  		    else
Karsten Hopp e6bc0d
  		    {
Karsten Hopp e6bc0d
--- 6042,6048 ----
Karsten Hopp e6bc0d
  			/* Search entry: Move the separator from the first
Karsten Hopp e6bc0d
  			 * column to after the NUL. */
Karsten Hopp e6bc0d
  			mch_memmove(p, val + 1, (size_t)len);
Karsten Hopp e6bc0d
! 			p[len] = sep;
Karsten Hopp e6bc0d
  		    }
Karsten Hopp e6bc0d
  		    else
Karsten Hopp e6bc0d
  		    {
Karsten Hopp e6bc0d
*** ../vim-7.3.424/src/version.c	2012-02-04 22:01:44.000000000 +0100
Karsten Hopp e6bc0d
--- src/version.c	2012-02-04 22:30:36.000000000 +0100
Karsten Hopp e6bc0d
***************
Karsten Hopp e6bc0d
*** 716,717 ****
Karsten Hopp e6bc0d
--- 716,719 ----
Karsten Hopp e6bc0d
  {   /* Add new patch number below this line */
Karsten Hopp e6bc0d
+ /**/
Karsten Hopp e6bc0d
+     425,
Karsten Hopp e6bc0d
  /**/
Karsten Hopp e6bc0d
Karsten Hopp e6bc0d
-- 
Karsten Hopp e6bc0d
"So this is it," said Arthur, "we are going to die."
Karsten Hopp e6bc0d
"Yes," said Ford, "except...no!  Wait a minute!"  He suddenly lunged across
Karsten Hopp e6bc0d
the chamber at something behind Arthur's line of vision.  "What's this
Karsten Hopp e6bc0d
switch?" he cried.
Karsten Hopp e6bc0d
"What?   Where?" cried Arthur, twisting around.
Karsten Hopp e6bc0d
"No, I was only fooling," said Ford, "we are going to die after all."
Karsten Hopp e6bc0d
		-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
Karsten Hopp e6bc0d
Karsten Hopp e6bc0d
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp e6bc0d
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp e6bc0d
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp e6bc0d
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///