diff vim/vimfiles/autoload/ctrlp/dir.vim @ 3:92af3257a261

Update to latest ctrlp.vim.
author Brian Neal <bgneal@gmail.com>
date Wed, 04 Jan 2012 19:37:22 -0600
parents 48859d9c82c5
children
line wrap: on
line diff
--- a/vim/vimfiles/autoload/ctrlp/dir.vim	Wed Jan 04 19:34:22 2012 -0600
+++ b/vim/vimfiles/autoload/ctrlp/dir.vim	Wed Jan 04 19:37:22 2012 -0600
@@ -11,12 +11,11 @@
 let [g:loaded_ctrlp_dir, g:ctrlp_newdir] = [1, 0]
 
 let s:ars = [
-	\ 's:folsym',
-	\ 's:dotfiles',
 	\ 's:maxdepth',
 	\ 's:maxfiles',
 	\ 's:compare_lim',
 	\ 's:glob',
+	\ 's:usrign',
 	\ ]
 
 let s:dir_var = ['ctrlp#dir#init('.join(s:ars, ', ').')', 'ctrlp#dir#accept',
@@ -29,17 +28,15 @@
 " Utilities {{{1
 fu! s:globdirs(dirs, depth)
 	let entries = split(globpath(a:dirs, s:glob), "\n")
-	if !s:folsym
-		let entries = filter(entries, 'getftype(v:val) != "link"')
+	if s:usrign != ''
+		cal filter(entries, 'v:val !~ s:usrign')
 	en
-	let ftrfunc = s:dotfiles ? 'ctrlp#dirfilter(v:val)' : 'isdirectory(v:val)'
-	let alldirs = filter(entries, ftrfunc)
-	cal extend(g:ctrlp_alldirs, alldirs)
-	let depth = a:depth + 1
-	if !empty(g:ctrlp_alldirs) && !s:max(len(g:ctrlp_alldirs), s:maxfiles)
+	let [dirs, depth] = [ctrlp#dirnfile(entries)[0], a:depth + 1]
+	cal extend(g:ctrlp_alldirs, dirs)
+	if !empty(dirs) && !s:max(len(g:ctrlp_alldirs), s:maxfiles)
 		\ && depth <= s:maxdepth
 		sil! cal ctrlp#progress(len(g:ctrlp_alldirs))
-		cal s:globdirs(join(alldirs, ','), depth)
+		cal s:globdirs(join(dirs, ','), depth)
 	en
 endf