Change bookmarkdir's cache

This commit is contained in:
Kien N 2012-04-15 02:00:06 +07:00
parent 43915113db
commit 863996ce26
2 changed files with 4 additions and 3 deletions

View File

@ -221,7 +221,8 @@ fu! ctrlp#clra()
let cache_dir = ctrlp#utils#cachedir()
if isdirectory(cache_dir)
let cache_files = split(s:glbpath(cache_dir, '**', 1), "\n")
let eval = '!isdirectory(v:val) && v:val !~ ''\<cache\.txt$\|\.log$'''
let eval = '!isdirectory(v:val) && fnamemodify(v:val, ":t") !~'
\ . ' ''\v^<cache>[.a-z]+$|\.log$'''
sil! cal map(filter(cache_files, eval), 'delete(v:val)')
en
cal ctrlp#clr()

View File

@ -34,8 +34,8 @@ endf
fu! s:cachefile()
if !exists('s:cadir') || !exists('s:cafile')
let s:cadir = ctrlp#utils#cachedir().ctrlp#utils#lash().'bookmark'
let s:cafile = s:cadir.ctrlp#utils#lash().'dir.txt'
let s:cadir = ctrlp#utils#cachedir().ctrlp#utils#lash().'bkd'
let s:cafile = s:cadir.ctrlp#utils#lash().'cache.txt'
en
retu s:cafile
endf