mirror of
https://github.com/amix/vimrc
synced 2025-07-21 20:05:00 +08:00
Updated vim plugins
This commit is contained in:
@ -569,9 +569,14 @@ endf
|
||||
fu! s:MatchedItems(items, pat, limit)
|
||||
let exc = exists('s:crfilerel') ? s:crfilerel : ''
|
||||
let items = s:narrowable() ? s:matched + s:mdata[3] : a:items
|
||||
if s:matcher != {}
|
||||
let matcher = s:getextvar('matcher')
|
||||
if empty(matcher) || type(matcher) != 4 || !has_key(matcher, 'match')
|
||||
unlet matcher
|
||||
let matcher = s:matcher
|
||||
en
|
||||
if matcher != {}
|
||||
let argms =
|
||||
\ has_key(s:matcher, 'arg_type') && s:matcher['arg_type'] == 'dict' ? [{
|
||||
\ has_key(matcher, 'arg_type') && matcher['arg_type'] == 'dict' ? [{
|
||||
\ 'items': items,
|
||||
\ 'str': a:pat,
|
||||
\ 'limit': a:limit,
|
||||
@ -580,7 +585,7 @@ fu! s:MatchedItems(items, pat, limit)
|
||||
\ 'crfile': exc,
|
||||
\ 'regex': s:regexp,
|
||||
\ }] : [items, a:pat, a:limit, s:mmode(), s:ispath, exc, s:regexp]
|
||||
let lines = call(s:matcher['match'], argms, s:matcher)
|
||||
let lines = call(matcher['match'], argms, matcher)
|
||||
el
|
||||
let lines = s:MatchIt(items, a:pat, a:limit, exc)
|
||||
en
|
||||
@ -1196,7 +1201,7 @@ fu! s:AcceptSelection(action)
|
||||
let type = exttype == 'dict' ? exttype : 'list'
|
||||
en
|
||||
en
|
||||
let actargs = type == 'dict' ? [{ 'action': md, 'line': line, 'icr': icr }]
|
||||
let actargs = type == 'dict' ? [{ 'action': md, 'line': line, 'icr': icr, 'input': str}]
|
||||
\ : [md, line]
|
||||
cal call(actfunc, actargs)
|
||||
endf
|
||||
@ -1873,6 +1878,11 @@ fu! s:highlight(pat, grp)
|
||||
en
|
||||
|
||||
cal matchadd('CtrlPLinePre', '^>')
|
||||
elseif !empty(a:pat) && s:regexp &&
|
||||
\ exists('g:ctrlp_regex_always_higlight') &&
|
||||
\ g:ctrlp_regex_always_higlight
|
||||
let pat = substitute(a:pat, '\\\@<!\^', '^> \\zs', 'g')
|
||||
cal matchadd(a:grp, ( s:martcs == '' ? '\c' : '\C').pat)
|
||||
en
|
||||
endf
|
||||
|
||||
@ -2494,7 +2504,9 @@ endf
|
||||
fu! s:getextvar(key)
|
||||
if s:itemtype >= len(s:coretypes) && len(g:ctrlp_ext_vars) > 0
|
||||
let vars = g:ctrlp_ext_vars[s:itemtype - len(s:coretypes)]
|
||||
retu has_key(vars, a:key) ? vars[a:key] : -1
|
||||
if has_key(vars, a:key)
|
||||
retu vars[a:key]
|
||||
en
|
||||
en
|
||||
retu get(g:, 'ctrlp_' . s:matchtype . '_' . a:key, -1)
|
||||
endf
|
||||
|
Reference in New Issue
Block a user