Skip to content

Fix tagorder when the argument contains a pattern#21

Open
pjkack wants to merge 1 commit into
ivalkeen:masterfrom
pjkack:upstream
Open

Fix tagorder when the argument contains a pattern#21
pjkack wants to merge 1 commit into
ivalkeen:masterfrom
pjkack:upstream

Conversation

@pjkack
Copy link
Copy Markdown
Contributor

@pjkack pjkack commented Mar 8, 2017

If the argument does not start with '/' then always treat it as a word
literal by escaping it properly for taglist. This behaviour is
consistent with ":tag" and ":stag", meaning that the jump will actually go
to the correct tag location. To get the best performance it is important
that the pattern taglist starts with exactly '^', else the binary search
seems to be skipped.

When argument is a pattern starting with '/', don't add the exact match
match anchors '^' and '$'.

:help taglist
taglist({expr}) Returns a list of tags matching the regular expression
{expr}

:help tag-regexp
The ":tag" and ":tselect" commands accept a regular expression argument.
When the argument starts with '/', it is used as a pattern. If the argument
does not start with '/', it is taken literally, as a full tag name.

If the argument does not start with '/' then always treat it as a word
literal by escaping it properly for taglist. This behaviour is
consistent with ":tag" and ":stag", meaning that the jump will actually go
to the correct tag location. To get the best performance it is important
that the pattern taglist starts with exactly '^', else the binary search
seems to be skipped.

When argument is a pattern starting with '/', don't add the exact match
match anchors '^' and '$'.

:help taglist
taglist({expr}) Returns a list of tags matching the regular expression
{expr}

:help tag-regexp
The ":tag" and ":tselect" commands accept a regular expression argument.
When the argument starts with '/', it is used as a pattern.  If the argument
does not start with '/', it is taken literally, as a full tag name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant