parent
75e31e9341
commit
370ac18b3b
@ -402,6 +402,7 @@ endf
|
|||||||
fu! s:Update(str)
|
fu! s:Update(str)
|
||||||
" Get the previous string if existed
|
" Get the previous string if existed
|
||||||
let oldstr = exists('s:savestr') ? s:savestr : ''
|
let oldstr = exists('s:savestr') ? s:savestr : ''
|
||||||
|
let pat = s:SplitPattern(a:str)
|
||||||
" Get the new string sans tail
|
" Get the new string sans tail
|
||||||
let notail = substitute(a:str, '\\\\', '\', 'g')
|
let notail = substitute(a:str, '\\\\', '\', 'g')
|
||||||
let notail = substitute(notail, '\\\@<!:\([^:]\|\\:\)*$', '', '')
|
let notail = substitute(notail, '\\\@<!:\([^:]\|\\:\)*$', '', '')
|
||||||
@ -410,7 +411,6 @@ fu! s:Update(str)
|
|||||||
if notail == oldstr && !empty(notail) && !exists('s:force')
|
if notail == oldstr && !empty(notail) && !exists('s:force')
|
||||||
retu
|
retu
|
||||||
en
|
en
|
||||||
let pat = s:SplitPattern(a:str)
|
|
||||||
let lines = exists('g:ctrlp_nolimit') && empty(notail) ? copy(g:ctrlp_lines)
|
let lines = exists('g:ctrlp_nolimit') && empty(notail) ? copy(g:ctrlp_lines)
|
||||||
\ : s:MatchedItems(g:ctrlp_lines, pat, s:mxheight)
|
\ : s:MatchedItems(g:ctrlp_lines, pat, s:mxheight)
|
||||||
cal s:Render(lines, pat)
|
cal s:Render(lines, pat)
|
||||||
@ -1147,7 +1147,7 @@ fu! s:highlight(pat, grp)
|
|||||||
if s:byfname
|
if s:byfname
|
||||||
" Match only filename
|
" Match only filename
|
||||||
let pat = substitute(pat, '\[\^\(.\{-}\)\]\\{-}', '[^\\/\1]\\{-}', 'g')
|
let pat = substitute(pat, '\[\^\(.\{-}\)\]\\{-}', '[^\\/\1]\\{-}', 'g')
|
||||||
let pat = substitute(pat, '$', '\\ze[^\\/]*$', 'g')
|
let pat = substitute(pat, '\$\@<!$', '\\ze[^\\/]*$', 'g')
|
||||||
en
|
en
|
||||||
cal matchadd(a:grp, '\c'.pat)
|
cal matchadd(a:grp, '\c'.pat)
|
||||||
if hlexists('CtrlPLinePre')
|
if hlexists('CtrlPLinePre')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user