summaryrefslogtreecommitdiffstats
path: root/src/tag.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-05 20:35:44 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-05 20:35:44 +0100
commit830c1afc9d2cd5819a05c71d4e0b1f748a8c0519 (patch)
tree6ce97c03e711c4017898dd209e596cb04dc43795 /src/tag.c
parent61d7c0d52ca40ab8488c36e619d1e46503affd0b (diff)
patch 8.2.0088: insufficient tests for tags; bug in using extra tag fieldv8.2.0088
Problem: Insufficient tests for tags; bug in using extra tag field when using an ex command to position the cursor. Solution: Fix the bug, add more tests. (Yegappan Lakshmanan, closes #5439)
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tag.c b/src/tag.c
index 4f897fa607..aaf19c9738 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -3808,6 +3808,7 @@ test_for_current(
find_extra(char_u **pp)
{
char_u *str = *pp;
+ char_u first_char = **pp;
// Repeat for addresses separated with ';'
for (;;)
@@ -3817,7 +3818,7 @@ find_extra(char_u **pp)
else if (*str == '/' || *str == '?')
{
str = skip_regexp(str + 1, *str, FALSE, NULL);
- if (*str != **pp)
+ if (*str != first_char)
str = NULL;
else
++str;
@@ -3837,6 +3838,7 @@ find_extra(char_u **pp)
|| !(VIM_ISDIGIT(str[1]) || str[1] == '/' || str[1] == '?'))
break;
++str; // skip ';'
+ first_char = *str;
}
if (str != NULL && STRNCMP(str, ";\"", 2) == 0)