parent
f170a5f9b0
commit
a126be38ef
@ -1123,23 +1123,27 @@ endf
|
|||||||
" Highlighting {{{2
|
" Highlighting {{{2
|
||||||
fu! s:syntax()
|
fu! s:syntax()
|
||||||
sy match CtrlPNoEntries '^ == NO ENTRIES ==$'
|
sy match CtrlPNoEntries '^ == NO ENTRIES ==$'
|
||||||
sy match CtrlPLineMarker '^>'
|
sy match CtrlPLinePre '^>'
|
||||||
hi link CtrlPNoEntries Error
|
hi link CtrlPNoEntries Error
|
||||||
hi CtrlPLineMarker guifg=bg
|
if exists('g:colors_name')
|
||||||
|
exe 'hi CtrlPLinePre '.( has("gui_running") ? 'gui' : 'cterm' ).'fg=bg'
|
||||||
|
en
|
||||||
endf
|
endf
|
||||||
|
|
||||||
fu! s:highlight(pat, grp, bfn)
|
fu! s:highlight(pat, grp, bfn)
|
||||||
cal clearmatches()
|
cal clearmatches()
|
||||||
if !empty(a:pat) && s:ispathitem()
|
if !empty(a:pat) && s:ispathitem()
|
||||||
let pat = substitute(a:pat, '\~', '\\~', 'g')
|
let pat = substitute(a:pat, '\~', '\\~', 'g')
|
||||||
let pat = s:regexp ? pat : escape(pat, '.')
|
let pat = s:regexp
|
||||||
|
\ ? substitute(pat, '\\\@<!\^', '^> \\zs', 'g')
|
||||||
|
\ : escape(pat, '.')
|
||||||
" Match only filename
|
" Match only filename
|
||||||
if s:byfname && a:bfn
|
if s:byfname && a:bfn
|
||||||
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)
|
||||||
cal matchadd('CtrlPLineMarker', '^>')
|
cal matchadd('CtrlPLinePre', '^>')
|
||||||
en
|
en
|
||||||
endf
|
endf
|
||||||
|
|
||||||
|
@ -741,6 +741,7 @@ Special thanks:~
|
|||||||
* Ken Earley <github.com/kenearley>
|
* Ken Earley <github.com/kenearley>
|
||||||
* Zak Johnson <github.com/zakj>
|
* Zak Johnson <github.com/zakj>
|
||||||
* Diego Viola <github.com/diegoviola>
|
* Diego Viola <github.com/diegoviola>
|
||||||
|
* Thibault Duplessis <github.com/ornicar>
|
||||||
Bugfixes/Corrections.
|
Bugfixes/Corrections.
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user