comparison src/search.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 04736b4030ec
children 8875401008da
comparison
equal deleted inserted replaced
4804:62663cfeb216 4805:66803af09906
970 ) 970 )
971 break; 971 break;
972 } 972 }
973 while (--count > 0 && found); /* stop after count matches or no match */ 973 while (--count > 0 && found); /* stop after count matches or no match */
974 974
975 vim_free(regmatch.regprog); 975 vim_regfree(regmatch.regprog);
976 976
977 called_emsg |= save_called_emsg; 977 called_emsg |= save_called_emsg;
978 978
979 if (!found) /* did not find it */ 979 if (!found) /* did not find it */
980 { 980 {
4678 && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum 4678 && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
4679 && regmatch.startpos[0].col == regmatch.endpos[0].col); 4679 && regmatch.startpos[0].col == regmatch.endpos[0].col);
4680 } 4680 }
4681 4681
4682 called_emsg |= save_called_emsg; 4682 called_emsg |= save_called_emsg;
4683 vim_free(regmatch.regprog); 4683 vim_regfree(regmatch.regprog);
4684 return result; 4684 return result;
4685 } 4685 }
4686 #endif /* FEAT_VISUAL */ 4686 #endif /* FEAT_VISUAL */
4687 4687
4688 #if defined(FEAT_LISP) || defined(FEAT_CINDENT) || defined(FEAT_TEXTOBJ) \ 4688 #if defined(FEAT_LISP) || defined(FEAT_CINDENT) || defined(FEAT_TEXTOBJ) \
5400 if (action == ACTION_SHOW || action == ACTION_SHOW_ALL) 5400 if (action == ACTION_SHOW || action == ACTION_SHOW_ALL)
5401 msg_end(); 5401 msg_end();
5402 5402
5403 fpip_end: 5403 fpip_end:
5404 vim_free(file_line); 5404 vim_free(file_line);
5405 vim_free(regmatch.regprog); 5405 vim_regfree(regmatch.regprog);
5406 vim_free(incl_regmatch.regprog); 5406 vim_regfree(incl_regmatch.regprog);
5407 vim_free(def_regmatch.regprog); 5407 vim_regfree(def_regmatch.regprog);
5408 } 5408 }
5409 5409
5410 static void 5410 static void
5411 show_pat_in_path(line, type, did_show, action, fp, lnum, count) 5411 show_pat_in_path(line, type, did_show, action, fp, lnum, count)
5412 char_u *line; 5412 char_u *line;