diff options
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 |