Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tagorder when the argument contains a pattern #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pjkack
Copy link
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.

None yet

1 participant