Mercurial > vim
changeset 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 | 36ba2efb53d4 |
children | 1e27867bcca3 |
files | src/tag.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tag.c +++ b/src/tag.c @@ -1326,6 +1326,7 @@ find_tags(pat, num_matches, matchesp, fl int match_no_ic = 0;/* matches with rm_ic == FALSE */ int match_re; /* match with regexp */ int matchoff = 0; + int save_emsg_off; #ifdef FEAT_EMACS_TAGS /* @@ -1442,7 +1443,10 @@ find_tags(pat, num_matches, matchesp, fl if (p_tl != 0 && orgpat.len > p_tl) /* adjust for 'taglength' */ orgpat.len = p_tl; + save_emsg_off = emsg_off; + emsg_off = TRUE; /* don't want error for invalid RE here */ prepare_pats(&orgpat, has_re); + emsg_off = save_emsg_off; if (has_re && orgpat.regmatch.regprog == NULL) goto findtag_end;