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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user