diff src/ex_getln.c @ 5467:6367a766027d v7.4.083

updated for version 7.4.083 Problem: It's hard to avoid adding a used pattern to the search history. Solution: Add the ":keeppatterns" modifier. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Sat, 09 Nov 2013 05:30:26 +0100
parents 878ed73c7070
children 31217cc48e7d
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -5498,6 +5498,9 @@ add_to_history(histype, new_entry, in_ma
     if (hislen == 0)		/* no history */
 	return;
 
+    if (cmdmod.keeppatterns && histype == HIST_SEARCH)
+	return;
+
     /*
      * Searches inside the same mapping overwrite each other, so that only
      * the last line is kept.  Be careful not to remove a line that was moved