summaryrefslogtreecommitdiff
path: root/src/tag.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-11-28 14:36:33 +0100
committerBram Moolenaar <Bram@vim.org>2013-11-28 14:36:33 +0100
commitdff54ac7e85f14f91faeadbaff22b23b2e5efb84 (patch)
treec9959f03b76a45703541d67c43135e29a7ba20ed /src/tag.c
parent174a848b677c6cd66def00d36a2b25332ca49e38 (diff)
downloadvim-dff54ac7e85f14f91faeadbaff22b23b2e5efb84.zip
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.
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tag.c b/src/tag.c
index e7ea52a29..be80a1165 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -1326,6 +1326,7 @@ find_tags(pat, num_matches, matchesp, flags, mincount, buf_ffname)
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, flags, mincount, buf_ffname)
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;