File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -425,14 +425,17 @@ fu! s:CloseCustomFuncs()
425425 en
426426endf
427427
428- if has (' patch-8.2-0995' )
428+ if has (' patch-8.2-0995' ) && get ( g: , ' ctrlp_use_readdir ' , 1 )
429429 fu ! s: GlobPath (dirs, depth)
430430 let entries = []
431431 let dirs = substitute (a: dirs , ' \\\([%# ]\)' , ' \1' , ' g' )
432432 for e in split (dirs, ' ,' )
433- sil let files = readdir (e , ' 1' , {' sort' : ' none' })
434- if ! s: showhidden | cal filter (files , ' v:val[0] != "."' ) | en
435- let entries += map (files , ' e.s:lash.v:val' )
433+ try
434+ let files = readdir (e , ' 1' , {' sort' : ' none' })
435+ if ! s: showhidden | cal filter (files , ' v:val[0] != "."' ) | en
436+ let entries += map (files , ' e.s:lash.v:val' )
437+ cat
438+ endt
436439 endfo
437440 let [dnf, depth] = [ctrlp#dirnfile (entries), a: depth + 1 ]
438441 if &wig != ' ' | cal filter (dnf[1 ], ' glob(v:val) != ""' ) | en
Original file line number Diff line number Diff line change @@ -846,6 +846,13 @@ Example: >
846846 *'g:ctrlp_brief_prompt'*
847847When this is set to 1, the <bs> on empty prompt exit CtrlP.
848848
849+ *'g:ctrlp_use_readdir'*
850+ Unlike kien/ctrlp.vim, ctrlpvim/ctrlp.vim uses readdir() instead of globpath()
851+ for speed. Set this option to 0 if you want to revert to the original
852+ behavior.
853+ Example: >
854+ let g:ctrlp_use_readdir = 0
855+ <
849856 *ctrlp-default-value*
850857Otherwise, you can use below to change default value.
851858Example: >
You can’t perform that action at this time.
0 commit comments