summaryrefslogtreecommitdiffstats
path: root/src/tag.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-03-30 19:12:02 +0100
committerBram Moolenaar <Bram@vim.org>2019-03-30 19:12:02 +0100
commit7559dcef6cfd0ba13271088fff51b8979fee950b (patch)
treec9ff3c5edf111e39156179015d0c8c028f5c0cd1 /src/tag.c
parentabab0b0fdd6535969447b03a4fffc1947918cf6c (diff)
patch 8.1.1087: tag stack is incorrect after CTRL-T and then :tagv8.1.1087
Problem: tag stack is incorrect after CTRL-T and then :tag Solution: Handle DT_TAG differently. (test by Andy Massimino, closes #3944, closes #4177)
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tag.c b/src/tag.c
index 950ab8d95a..c5cec8bc09 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -504,13 +504,16 @@ do_tag(
tagmatchname = vim_strsave(name);
}
- if (type == DT_TAG || type == DT_SELECT || type == DT_JUMP
+ if (type == DT_SELECT || type == DT_JUMP
#if defined(FEAT_QUICKFIX)
|| type == DT_LTAG
#endif
)
cur_match = MAXCOL - 1;
- max_num_matches = cur_match + 1;
+ if (type == DT_TAG)
+ max_num_matches = MAXCOL;
+ else
+ max_num_matches = cur_match + 1;
/* when the argument starts with '/', use it as a regexp */
if (!no_regexp && *name == '/')
@@ -583,7 +586,7 @@ do_tag(
}
else
#endif
- if (type == DT_TAG)
+ if (type == DT_TAG && *tag != NUL)
/*
* If a count is supplied to the ":tag <name>" command, then
* jump to count'th matching tag.