Mercurial > vim
comparison src/ex_cmds2.c @ 4805:66803af09906 v7.3.1149
updated for version 7.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().
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 08 Jun 2013 18:19:48 +0200 |
parents | f824cb97eb92 |
children | 208a6c04e6b8 |
comparison
equal
deleted
inserted
replaced
4804:62663cfeb216 | 4805:66803af09906 |
---|---|
650 else | 650 else |
651 { | 651 { |
652 while (gap->ga_len > 0) | 652 while (gap->ga_len > 0) |
653 { | 653 { |
654 vim_free(DEBUGGY(gap, todel).dbg_name); | 654 vim_free(DEBUGGY(gap, todel).dbg_name); |
655 vim_free(DEBUGGY(gap, todel).dbg_prog); | 655 vim_regfree(DEBUGGY(gap, todel).dbg_prog); |
656 --gap->ga_len; | 656 --gap->ga_len; |
657 if (todel < gap->ga_len) | 657 if (todel < gap->ga_len) |
658 mch_memmove(&DEBUGGY(gap, todel), &DEBUGGY(gap, todel + 1), | 658 mch_memmove(&DEBUGGY(gap, todel), &DEBUGGY(gap, todel + 1), |
659 (gap->ga_len - todel) * sizeof(struct debuggy)); | 659 (gap->ga_len - todel) * sizeof(struct debuggy)); |
660 #ifdef FEAT_PROFILE | 660 #ifdef FEAT_PROFILE |
1983 if (curwin->w_arg_idx > match) | 1983 if (curwin->w_arg_idx > match) |
1984 --curwin->w_arg_idx; | 1984 --curwin->w_arg_idx; |
1985 --match; | 1985 --match; |
1986 } | 1986 } |
1987 | 1987 |
1988 vim_free(regmatch.regprog); | 1988 vim_regfree(regmatch.regprog); |
1989 vim_free(p); | 1989 vim_free(p); |
1990 if (!didone) | 1990 if (!didone) |
1991 EMSG2(_(e_nomatch2), ((char_u **)new_ga.ga_data)[i]); | 1991 EMSG2(_(e_nomatch2), ((char_u **)new_ga.ga_data)[i]); |
1992 } | 1992 } |
1993 ga_clear(&new_ga); | 1993 ga_clear(&new_ga); |