1
0
forked from aniani/vim

patch 8.2.0088: insufficient tests for tags; bug in using extra tag field

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)
This commit is contained in:
Bram Moolenaar
2020-01-05 20:35:44 +01:00
parent 61d7c0d52c
commit 830c1afc9d
7 changed files with 448 additions and 8 deletions

View File

@@ -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)