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/cmdexpand.c b/src/cmdexpand.c
index b3f18c6..7381b0e 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -1976,6 +1976,8 @@
 	flags |= EW_KEEPALL;
     if (options & WILD_SILENT)
 	flags |= EW_SILENT;
+    if (options & WILD_NOERROR)
+	flags |= EW_NOERROR;
     if (options & WILD_ALLLINKS)
 	flags |= EW_ALLLINKS;