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:
- Its built-in
s:MatchIt().
- A custom matcher supplied via
g:ctrlp_match_func, referenced throughout as s:matcher.
- 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.
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:
s:MatchIt().g:ctrlp_match_func, referenced throughout ass:matcher.s:getextvar('matcher')ins: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 checkss:matcherto determine whether a custom matcher was run. There's a few associated bugs:s:Update()method usess:SplitPattern()on the current search term if no global matcher is registered here. Since this happens before plugin specific matchers are loaded, the pattern supplied to them varies.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 checkings:matcherdirectly.