]> granicus.if.org Git - vim/commitdiff
patch 8.1.2186: error for bad regexp even though regexp is not used v8.1.2186
authorBram Moolenaar <Bram@vim.org>
Sat, 19 Oct 2019 18:57:28 +0000 (20:57 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 19 Oct 2019 18:57:28 +0000 (20:57 +0200)
Problem:    Error for bad regexp even though regexp is not used, when writing
            a file. (Arseny Nasokin)
Solution:   Ignore regexp errors. (closes #5059)

src/option.c
src/version.c

index 31bf8760b8ac2f6fe7a4b9d66ec1db625cea5a0d..3314a3c4b74b861374fde67d8be3423c5db2159c 100644 (file)
@@ -5812,8 +5812,8 @@ buf_copy_options(buf_T *buf, int flags)
 
        if (should_copy || (flags & BCO_ALWAYS))
        {
-           vim_memset(buf->b_p_script_ctx, 0, sizeof(buf->b_p_script_ctx));
 #ifdef FEAT_EVAL
+           vim_memset(buf->b_p_script_ctx, 0, sizeof(buf->b_p_script_ctx));
            init_buf_opt_idx();
 #endif
            // Don't copy the options specific to a help buffer when
index dd957cd39fb2a28fda357d58d506bd30a2a191c9..65979b2535dede9330288d1e15f71cc7599e6212 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2186,
 /**/
     2185,
 /**/