summaryrefslogtreecommitdiffstats
path: root/src/testing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing.c')
-rw-r--r--src/testing.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testing.c b/src/testing.c
index 5dacf073b3..c2b382b8b6 100644
--- a/src/testing.c
+++ b/src/testing.c
@@ -632,6 +632,19 @@ f_test_autochdir(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
}
/*
+ * "test_clear_search_pat()"
+ * Free the last search and substitute patterns
+ */
+ void
+f_test_clear_search_pat(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+{
+ free_last_pat(RE_SUBST);
+ free_last_pat(RE_SEARCH);
+ set_old_sub(NULL);
+ free_regexp_prev_sub();
+}
+
+/*
* "test_feedinput()"
*/
void