summaryrefslogtreecommitdiff
path: root/src/regexp.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-02-05 20:38:22 +0100
committerBram Moolenaar <Bram@vim.org>2020-02-05 20:38:22 +0100
commit07ada5ff2fd8f22ed3233ae5c4ddf87c7b3f56fe (patch)
tree0be9740166fea1f37b2a447558c7eed059b5a671 /src/regexp.c
parent94255df057afa0b7dde77612f3274d4440871bd1 (diff)
downloadvim-git-07ada5ff2fd8f22ed3233ae5c4ddf87c7b3f56fe.tar.gz
patch 8.2.0212: missing search/substitute pattern hardly testedv8.2.0212
Problem: Missing search/substitute pattern hardly tested. Solution: Add test_clear_search_pat() and tests. (Yegappan Lakshmanan, closes #5579)
Diffstat (limited to 'src/regexp.c')
-rw-r--r--src/regexp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/regexp.c b/src/regexp.c
index ef3896c0a..7aeddb83c 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -2663,6 +2663,15 @@ free_regexp_stuff(void)
}
#endif
+/*
+ * Free the previously used substitute search pattern.
+ */
+ void
+free_regexp_prev_sub(void)
+{
+ VIM_CLEAR(reg_prev_sub);
+}
+
#ifdef FEAT_EVAL
static void
report_re_switch(char_u *pat)