Skip to content

Commit 064bc6e

Browse files
committed
support plugin-local matcher
1 parent 019f20a commit 064bc6e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

autoload/ctrlp.vim

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,14 @@ endf
569569
fu! s:MatchedItems(items, pat, limit)
570570
let exc = exists('s:crfilerel') ? s:crfilerel : ''
571571
let items = s:narrowable() ? s:matched + s:mdata[3] : a:items
572-
if s:matcher != {}
572+
let matcher = s:getextvar('matcher')
573+
let g:hoge = matcher
574+
if empty(matcher)
575+
let matcher = s:matcher
576+
en
577+
if matcher != {}
573578
let argms =
574-
\ has_key(s:matcher, 'arg_type') && s:matcher['arg_type'] == 'dict' ? [{
579+
\ has_key(matcher, 'arg_type') && matcher['arg_type'] == 'dict' ? [{
575580
\ 'items': items,
576581
\ 'str': a:pat,
577582
\ 'limit': a:limit,
@@ -580,7 +585,7 @@ fu! s:MatchedItems(items, pat, limit)
580585
\ 'crfile': exc,
581586
\ 'regex': s:regexp,
582587
\ }] : [items, a:pat, a:limit, s:mmode(), s:ispath, exc, s:regexp]
583-
let lines = call(s:matcher['match'], argms, s:matcher)
588+
let lines = call(matcher['match'], argms, matcher)
584589
el
585590
let lines = s:MatchIt(items, a:pat, a:limit, exc)
586591
en

0 commit comments

Comments
 (0)