diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-11-09 05:30:26 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-11-09 05:30:26 +0100 |
commit | a939e434407b749adf4d50ea9f3f13b6a9abaf86 (patch) | |
tree | 7694960d7e76e61912c84b780a6daae8afbc42f7 /src/ex_getln.c | |
parent | 8e69b4a319d7933d491ac49a2812c964e8dc85b3 (diff) |
updated for version 7.4.083v7.4.083
Problem: It's hard to avoid adding a used pattern to the search history.
Solution: Add the ":keeppatterns" modifier. (Christian Brabandt)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 7ec47c7028..906eb8bb0c 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -5498,6 +5498,9 @@ add_to_history(histype, new_entry, in_map, sep) 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 |