From 50e494d63548566dd8c3f5cb29d4e4afdf12fb6b Mon Sep 17 00:00:00 2001 From: Kien N Date: Thu, 21 Mar 2013 10:14:34 +0700 Subject: [PATCH] Apply mruf_relative to the raw list Closes #329 Closes #383 --- autoload/ctrlp/mrufiles.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/ctrlp/mrufiles.vim b/autoload/ctrlp/mrufiles.vim index 908052f..e34f450 100644 --- a/autoload/ctrlp/mrufiles.vim +++ b/autoload/ctrlp/mrufiles.vim @@ -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()