Skip to content

Bug? Uneven custom matcher handling #640

Description

@Prajjwal

This is more of a question.

As far as I can tell, ctrlp uses one of three match functions at runtime in ascending order of preference:

  1. Its built-in s:MatchIt().
  2. A custom matcher supplied via g:ctrlp_match_func, referenced throughout as s:matcher.
  3. A plugin specific matcher, loaded via s:getextvar('matcher') in s:MatchedItems(). code.

Support for the last one was introduced in 064bc6e, but only the s:MatchedItems() method is aware of this. The rest of the plugin still checks s:matcher to determine whether a custom matcher was run. There's a few associated bugs:

I ran into this while working on #639, and they look like bugs to me.

My question is - is this intentional? If not, then I'm happy to submit a patch for it. A good fix would be to introduce a helper like s:CustomMatcherPresent() and use it throughout instead of checking s:matcher directly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions