diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-12-08 22:02:51 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-12-08 22:02:51 +0000 |
commit | 18f9a796731356c72c2bfc817ef72c03550768e2 (patch) | |
tree | fe65679603dfef7ffed5ed791427d1c315730bc7 | |
parent | 77197e44d68fe2915717add6177aa4f0603880b5 (diff) | |
download | vim-18f9a796731356c72c2bfc817ef72c03550768e2.zip |
updated for version 7.0165
-rw-r--r-- | src/option.c | 25 | ||||
-rw-r--r-- | src/version.h | 4 |
2 files changed, 16 insertions, 13 deletions
diff --git a/src/option.c b/src/option.c index 14d40c9ae..e49d9326c 100644 --- a/src/option.c +++ b/src/option.c @@ -6530,21 +6530,24 @@ compile_cap_prog(buf) buf_T *buf; { regprog_T *rp = buf->b_cap_prog; + char_u *re; if (*buf->b_p_spc == NUL) - { buf->b_cap_prog = NULL; - vim_free(rp); - return NULL; - } - - /* Prepend a ^ so that we only match at one column */ - vim_snprintf((char *)IObuff, IOSIZE, "^%s", buf->b_p_spc); - buf->b_cap_prog = vim_regcomp(IObuff, RE_MAGIC); - if (buf->b_cap_prog == NULL) + else { - buf->b_cap_prog = rp; - return e_invarg; + /* Prepend a ^ so that we only match at one column */ + re = concat_str((char_u *)"^", buf->b_p_spc); + if (re != NULL) + { + buf->b_cap_prog = vim_regcomp(re, RE_MAGIC); + if (buf->b_cap_prog == NULL) + { + buf->b_cap_prog = rp; /* restore the previous program */ + return e_invarg; + } + vim_free(re); + } } vim_free(rp); diff --git a/src/version.h b/src/version.h index abd2d2799..c38bb8e8c 100644 --- a/src/version.h +++ b/src/version.h @@ -36,5 +36,5 @@ #define VIM_VERSION_NODOT "vim70aa" #define VIM_VERSION_SHORT "7.0aa" #define VIM_VERSION_MEDIUM "7.0aa ALPHA" -#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Dec 7)" -#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Dec 7, compiled " +#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Dec 8)" +#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Dec 8, compiled " |