Karsten Hopp df4c36
To: vim_dev@googlegroups.com
Karsten Hopp df4c36
Subject: Patch 7.4.083
Karsten Hopp df4c36
Fcc: outbox
Karsten Hopp df4c36
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp df4c36
Mime-Version: 1.0
Karsten Hopp df4c36
Content-Type: text/plain; charset=UTF-8
Karsten Hopp df4c36
Content-Transfer-Encoding: 8bit
Karsten Hopp df4c36
------------
Karsten Hopp df4c36
Karsten Hopp df4c36
Patch 7.4.083
Karsten Hopp df4c36
Problem:    It's hard to avoid adding a used pattern to the search history.
Karsten Hopp df4c36
Solution:   Add the ":keeppatterns" modifier. (Christian Brabandt)
Karsten Hopp df4c36
Files:      runtime/doc/cmdline.txt, src/ex_cmds.h, src/ex_docmd.c,
Karsten Hopp df4c36
            src/ex_getln.c, src/structs.h
Karsten Hopp df4c36
Karsten Hopp df4c36
Karsten Hopp df4c36
*** ../vim-7.4.082/runtime/doc/cmdline.txt	2013-08-10 13:24:52.000000000 +0200
Karsten Hopp df4c36
--- runtime/doc/cmdline.txt	2013-11-09 04:26:30.000000000 +0100
Karsten Hopp df4c36
***************
Karsten Hopp df4c36
*** 356,361 ****
Karsten Hopp df4c36
--- 356,365 ----
Karsten Hopp df4c36
  		List the recent five entries from all histories: >
Karsten Hopp df4c36
  			:history all -5,
Karsten Hopp df4c36
  
Karsten Hopp df4c36
+ :keepp[atterns] {command}			*:keepp* *:keeppatterns*
Karsten Hopp df4c36
+ 		Execute {command}, without adding anything to the search
Karsten Hopp df4c36
+ 		history
Karsten Hopp df4c36
+ 
Karsten Hopp df4c36
  ==============================================================================
Karsten Hopp df4c36
  2. Command-line completion				*cmdline-completion*
Karsten Hopp df4c36
  
Karsten Hopp df4c36
*** ../vim-7.4.082/src/ex_cmds.h	2013-06-08 15:08:20.000000000 +0200
Karsten Hopp df4c36
--- src/ex_cmds.h	2013-11-09 04:26:30.000000000 +0100
Karsten Hopp df4c36
***************
Karsten Hopp df4c36
*** 477,482 ****
Karsten Hopp df4c36
--- 477,484 ----
Karsten Hopp df4c36
  			NEEDARG|EXTRA|NOTRLCOM),
Karsten Hopp df4c36
  EX(CMD_keepjumps,	"keepjumps",	ex_wrongmodifier,
Karsten Hopp df4c36
  			NEEDARG|EXTRA|NOTRLCOM),
Karsten Hopp df4c36
+ EX(CMD_keeppatterns,	"keeppatterns",	ex_wrongmodifier,
Karsten Hopp df4c36
+ 			NEEDARG|EXTRA|NOTRLCOM),
Karsten Hopp df4c36
  EX(CMD_keepalt,		"keepalt",	ex_wrongmodifier,
Karsten Hopp df4c36
  			NEEDARG|EXTRA|NOTRLCOM),
Karsten Hopp df4c36
  EX(CMD_list,		"list",		ex_print,
Karsten Hopp df4c36
*** ../vim-7.4.082/src/ex_docmd.c	2013-11-09 03:31:45.000000000 +0100
Karsten Hopp df4c36
--- src/ex_docmd.c	2013-11-09 04:31:36.000000000 +0100
Karsten Hopp df4c36
***************
Karsten Hopp df4c36
*** 1843,1848 ****
Karsten Hopp df4c36
--- 1843,1853 ----
Karsten Hopp df4c36
  			    cmdmod.keepalt = TRUE;
Karsten Hopp df4c36
  			    continue;
Karsten Hopp df4c36
  			}
Karsten Hopp df4c36
+ 			if (checkforcmd(&ea.cmd, "keeppatterns", 5))
Karsten Hopp df4c36
+ 			{
Karsten Hopp df4c36
+ 			    cmdmod.keeppatterns = TRUE;
Karsten Hopp df4c36
+ 			    continue;
Karsten Hopp df4c36
+ 			}
Karsten Hopp df4c36
  			if (!checkforcmd(&ea.cmd, "keepjumps", 5))
Karsten Hopp df4c36
  			    break;
Karsten Hopp df4c36
  			cmdmod.keepjumps = TRUE;
Karsten Hopp df4c36
***************
Karsten Hopp df4c36
*** 2584,2589 ****
Karsten Hopp df4c36
--- 2589,2595 ----
Karsten Hopp df4c36
  	    case CMD_keepalt:
Karsten Hopp df4c36
  	    case CMD_keepjumps:
Karsten Hopp df4c36
  	    case CMD_keepmarks:
Karsten Hopp df4c36
+ 	    case CMD_keeppatterns:
Karsten Hopp df4c36
  	    case CMD_leftabove:
Karsten Hopp df4c36
  	    case CMD_let:
Karsten Hopp df4c36
  	    case CMD_lockmarks:
Karsten Hopp df4c36
***************
Karsten Hopp df4c36
*** 3089,3094 ****
Karsten Hopp df4c36
--- 3095,3101 ----
Karsten Hopp df4c36
      {"keepalt", 5, FALSE},
Karsten Hopp df4c36
      {"keepjumps", 5, FALSE},
Karsten Hopp df4c36
      {"keepmarks", 3, FALSE},
Karsten Hopp df4c36
+     {"keeppatterns", 5, FALSE},
Karsten Hopp df4c36
      {"leftabove", 5, FALSE},
Karsten Hopp df4c36
      {"lockmarks", 3, FALSE},
Karsten Hopp df4c36
      {"noautocmd", 3, FALSE},
Karsten Hopp df4c36
***************
Karsten Hopp df4c36
*** 3597,3602 ****
Karsten Hopp df4c36
--- 3604,3610 ----
Karsten Hopp df4c36
  	case CMD_keepalt:
Karsten Hopp df4c36
  	case CMD_keepjumps:
Karsten Hopp df4c36
  	case CMD_keepmarks:
Karsten Hopp df4c36
+ 	case CMD_keeppatterns:
Karsten Hopp df4c36
  	case CMD_leftabove:
Karsten Hopp df4c36
  	case CMD_lockmarks:
Karsten Hopp df4c36
  	case CMD_rightbelow:
Karsten Hopp df4c36
*** ../vim-7.4.082/src/ex_getln.c	2013-11-05 07:12:59.000000000 +0100
Karsten Hopp df4c36
--- src/ex_getln.c	2013-11-09 04:26:30.000000000 +0100
Karsten Hopp df4c36
***************
Karsten Hopp df4c36
*** 5498,5503 ****
Karsten Hopp df4c36
--- 5498,5506 ----
Karsten Hopp df4c36
      if (hislen == 0)		/* no history */
Karsten Hopp df4c36
  	return;
Karsten Hopp df4c36
  
Karsten Hopp df4c36
+     if (cmdmod.keeppatterns && histype == HIST_SEARCH)
Karsten Hopp df4c36
+ 	return;
Karsten Hopp df4c36
+ 
Karsten Hopp df4c36
      /*
Karsten Hopp df4c36
       * Searches inside the same mapping overwrite each other, so that only
Karsten Hopp df4c36
       * the last line is kept.  Be careful not to remove a line that was moved
Karsten Hopp df4c36
*** ../vim-7.4.082/src/structs.h	2013-11-06 05:26:08.000000000 +0100
Karsten Hopp df4c36
--- src/structs.h	2013-11-09 04:26:30.000000000 +0100
Karsten Hopp df4c36
***************
Karsten Hopp df4c36
*** 542,547 ****
Karsten Hopp df4c36
--- 542,548 ----
Karsten Hopp df4c36
      int		keepmarks;		/* TRUE when ":keepmarks" was used */
Karsten Hopp df4c36
      int		keepjumps;		/* TRUE when ":keepjumps" was used */
Karsten Hopp df4c36
      int		lockmarks;		/* TRUE when ":lockmarks" was used */
Karsten Hopp df4c36
+     int		keeppatterns;		/* TRUE when ":keeppatterns" was used */
Karsten Hopp df4c36
  # ifdef FEAT_AUTOCMD
Karsten Hopp df4c36
      char_u	*save_ei;		/* saved value of 'eventignore' */
Karsten Hopp df4c36
  # endif
Karsten Hopp df4c36
*** ../vim-7.4.082/src/version.c	2013-11-09 03:31:45.000000000 +0100
Karsten Hopp df4c36
--- src/version.c	2013-11-09 04:29:07.000000000 +0100
Karsten Hopp df4c36
***************
Karsten Hopp df4c36
*** 740,741 ****
Karsten Hopp df4c36
--- 740,743 ----
Karsten Hopp df4c36
  {   /* Add new patch number below this line */
Karsten Hopp df4c36
+ /**/
Karsten Hopp df4c36
+     83,
Karsten Hopp df4c36
  /**/
Karsten Hopp df4c36
Karsten Hopp df4c36
-- 
Karsten Hopp df4c36
I am always surprised in the Linux world how quickly solutions can be
Karsten Hopp df4c36
obtained.  (Imagine sending an email to Bill Gates, asking why Windows
Karsten Hopp df4c36
crashed, and how to fix it...  and then getting an answer that fixed the
Karsten Hopp df4c36
problem... <0>_<0> !)		              -- Mark Langdon
Karsten Hopp df4c36
Karsten Hopp df4c36
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp df4c36
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp df4c36
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp df4c36
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///