patch 8.2.0212: missing search/substitute pattern hardly tested
Problem: Missing search/substitute pattern hardly tested.
Solution: Add test_clear_search_pat() and tests. (Yegappan Lakshmanan,
closes #5579)
diff --git a/src/regexp.c b/src/regexp.c
index ef3896c..7aeddb8 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -2663,6 +2663,15 @@
}
#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)