Apply mruf_relative to the raw list

Closes #329
Closes #383
This commit is contained in:
Kien N 2013-03-21 10:14:34 +07:00
parent 76f4f42d50
commit 50e494d635

View File

@ -38,13 +38,14 @@ fu! s:chop(mrufs)
retu a:mrufs
endf
fu! s:reformat(mrufs)
fu! s:reformat(mrufs, ...)
let cwd = getcwd()
let cwd .= cwd !~ '[\/]$' ? ctrlp#utils#lash() : ''
if {s:re}
let cwd = exists('+ssl') ? tr(cwd, '/', '\') : cwd
cal filter(a:mrufs, '!stridx(v:val, cwd)')
en
if a:0 && a:1 == 'raw' | retu a:mrufs | en
let idx = strlen(cwd)
if exists('+ssl') && &ssl
let cwd = tr(cwd, '\', '/')
@ -117,7 +118,8 @@ fu! ctrlp#mrufiles#add(fn)
endf
fu! ctrlp#mrufiles#list(...)
retu a:0 ? a:1 == 'raw' ? s:mergelists() : 0 : s:reformat(s:mergelists())
retu a:0 ? a:1 == 'raw' ? s:reformat(s:mergelists(), a:1) : 0
\ : s:reformat(s:mergelists())
endf
fu! ctrlp#mrufiles#bufs()