comparison src/tag.c @ 5513:eed95874f30e v7.4.105

updated for version 7.4.105 Problem: Completing a tag pattern may give an error for invalid pattern. Solution: Suppress the error, just return no matches.
author Bram Moolenaar <bram@vim.org>
date Thu, 28 Nov 2013 14:36:33 +0100
parents 6ae816249627
children 8d1ba0a23588
comparison
equal deleted inserted replaced
5512:36ba2efb53d4 5513:eed95874f30e
1324 int cmplen; 1324 int cmplen;
1325 int match; /* matches */ 1325 int match; /* matches */
1326 int match_no_ic = 0;/* matches with rm_ic == FALSE */ 1326 int match_no_ic = 0;/* matches with rm_ic == FALSE */
1327 int match_re; /* match with regexp */ 1327 int match_re; /* match with regexp */
1328 int matchoff = 0; 1328 int matchoff = 0;
1329 int save_emsg_off;
1329 1330
1330 #ifdef FEAT_EMACS_TAGS 1331 #ifdef FEAT_EMACS_TAGS
1331 /* 1332 /*
1332 * Stack for included emacs-tags file. 1333 * Stack for included emacs-tags file.
1333 * It has a fixed size, to truncate cyclic includes. jw 1334 * It has a fixed size, to truncate cyclic includes. jw
1440 } 1441 }
1441 #endif 1442 #endif
1442 if (p_tl != 0 && orgpat.len > p_tl) /* adjust for 'taglength' */ 1443 if (p_tl != 0 && orgpat.len > p_tl) /* adjust for 'taglength' */
1443 orgpat.len = p_tl; 1444 orgpat.len = p_tl;
1444 1445
1446 save_emsg_off = emsg_off;
1447 emsg_off = TRUE; /* don't want error for invalid RE here */
1445 prepare_pats(&orgpat, has_re); 1448 prepare_pats(&orgpat, has_re);
1449 emsg_off = save_emsg_off;
1446 if (has_re && orgpat.regmatch.regprog == NULL) 1450 if (has_re && orgpat.regmatch.regprog == NULL)
1447 goto findtag_end; 1451 goto findtag_end;
1448 1452
1449 #ifdef FEAT_TAG_BINS 1453 #ifdef FEAT_TAG_BINS
1450 /* This is only to avoid a compiler warning for using search_info 1454 /* This is only to avoid a compiler warning for using search_info