patch 8.1.2187: error for bad regexp even though regexp is not used
Problem: Error for bad regexp even though regexp is not used when writing
a file. (Arseny Nasokin)
Solution: Ignore regexp errors. (closes #5059)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 4dd7ba2..1d04769 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -4211,7 +4211,8 @@
else /* n == 2 */
{
expand_T xpc;
- int options = WILD_LIST_NOTFOUND|WILD_ADD_SLASH;
+ int options = WILD_LIST_NOTFOUND
+ | WILD_NOERROR | WILD_ADD_SLASH;
ExpandInit(&xpc);
xpc.xp_context = EXPAND_FILES;