Skip to content

Commit

Permalink
Allow x_func options to be defined using dict functions
Browse files Browse the repository at this point in the history
Closes #319
  • Loading branch information
mattn authored and kien committed Nov 22, 2012
1 parent 4f7d0a3 commit f9ada48
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions autoload/ctrlp.vim
Expand Up @@ -432,7 +432,7 @@ fu! s:MatchedItems(items, pat, limit)
let items = s:narrowable() ? s:matched + s:mdata[3] : a:items
if s:matcher != {}
let argms = [items, a:pat, a:limit, s:mmode(), s:ispath, exc, s:regexp]
let lines = call(s:matcher['match'], argms)
let lines = call(s:matcher['match'], argms, s:matcher)
el
let lines = s:MatchIt(items, a:pat, a:limit, exc)
en
Expand Down Expand Up @@ -1140,7 +1140,7 @@ fu! s:OpenNoMarks(md, line)
cal s:remarksigns()
cal s:BuildPrompt(0)
elsei a:md == 'x'
cal call(s:openfunc[s:ctype], [a:md, a:line])
cal call(s:openfunc[s:ctype], [a:md, a:line], s:openfunc)
elsei a:md == 'd'
let dir = fnamemodify(a:line, ':h')
if isdirectory(dir)
Expand Down Expand Up @@ -1276,7 +1276,7 @@ fu! ctrlp#statusline()
\ exists('s:marked') ? ' <'.s:dismrk().'>' : ' <->' : ''
if s:status != {}
let args = [focus, byfname, s:regexp, prv, s:ctype, nxt, marked]
let &l:stl = call(s:status['main'], args)
let &l:stl = call(s:status['main'], args, s:status)
el
let item = '%#CtrlPMode1# '.s:ctype.' %*'
let focus = '%#CtrlPMode2# '.focus.' %*'
Expand All @@ -1296,7 +1296,7 @@ endf
fu! ctrlp#progress(enum, ...)
if has('macunix') || has('mac') | sl 1m | en
let txt = a:0 ? '(press ctrl-c to abort)' : ''
let &l:stl = s:status != {} ? call(s:status['prog'], [a:enum])
let &l:stl = s:status != {} ? call(s:status['prog'], [a:enum], s:status)
\ : '%#CtrlPStats# '.a:enum.' %* '.txt.'%=%<%#CtrlPMode2# %{getcwd()} %*'
redraws
endf
Expand Down Expand Up @@ -1869,9 +1869,9 @@ endf

fu! s:buffunc(e)
if a:e && has_key(s:buffunc, 'enter')
cal call(s:buffunc['enter'], [])
cal call(s:buffunc['enter'], [], s:buffunc)
elsei !a:e && has_key(s:buffunc, 'exit')
cal call(s:buffunc['exit'], [])
cal call(s:buffunc['exit'], [], s:buffunc)
en
endf

Expand Down

0 comments on commit f9ada48

Please sign in to comment.