diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-08 18:19:48 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-08 18:19:48 +0200 |
commit | 473de61b0409f8f8c86585733f099f882122b280 (patch) | |
tree | 0c2b031a29a283c70d63368c38031517572d954c /src/buffer.c | |
parent | cd9c46265e4a12cf716187bc8188c7399797f806 (diff) |
updated for version 7.3.1149v7.3.1149
Problem: New regexp engine: Matching plain text could be faster.
Solution: Detect a plain text match and handle it specifically. Add
vim_regfree().
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c index a46e30ed1c..6e3fa55b8b 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1898,7 +1898,7 @@ free_buf_options(buf, free_p_ff) #ifdef FEAT_SPELL clear_string_option(&buf->b_s.b_p_spc); clear_string_option(&buf->b_s.b_p_spf); - vim_free(buf->b_s.b_cap_prog); + vim_regfree(buf->b_s.b_cap_prog); buf->b_s.b_cap_prog = NULL; clear_string_option(&buf->b_s.b_p_spl); #endif @@ -2246,7 +2246,7 @@ buflist_findpat(pattern, pattern_end, unlisted, diffmode, curtab_only) match = buf->b_fnum; /* remember first match */ } - vim_free(prog); + vim_regfree(prog); if (match >= 0) /* found one match */ break; } @@ -2355,14 +2355,14 @@ ExpandBufnames(pat, num_file, file, options) *file = (char_u **)alloc((unsigned)(count * sizeof(char_u *))); if (*file == NULL) { - vim_free(prog); + vim_regfree(prog); if (patc != pat) vim_free(patc); return FAIL; } } } - vim_free(prog); + vim_regfree(prog); if (count) /* match(es) found, break here */ break; } |