From 74155db2ef8ddba725873987a673f7275fbb70ba Mon Sep 17 00:00:00 2001 From: Kien N Date: Mon, 9 Jul 2012 18:43:05 +0700 Subject: [PATCH] Use %{} to evaluate the cwd displayed on the statusline In case the cwd has %'s in it, resulting in a messed up looking cwd. --- autoload/ctrlp.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index 650c6da..2f825c2 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -1190,7 +1190,7 @@ fu! ctrlp#statusline() let byfname = '%#CtrlPMode1# '.byfname.' %*' let regex = s:regexp ? '%#CtrlPMode2# regex %*' : '' let slider = ' <'.prv.'>={'.item.'}=<'.nxt.'>' - let dir = ' %=%<%#CtrlPMode2# '.s:dyncwd.' %*' + let dir = ' %=%<%#CtrlPMode2# %{getcwd()} %*' let &l:stl = focus.byfname.regex.slider.marked.dir en endf @@ -1204,7 +1204,7 @@ fu! ctrlp#progress(enum, ...) if has('macunix') || has('mac') | sl 1m | en let txt = a:0 ? '(press ctrl-c to abort)' : '' let &l:stl = s:status != {} ? call(s:status['prog'], [a:enum]) - \ : '%#CtrlPStats# '.a:enum.' %* '.txt.'%=%<%#CtrlPMode2# '.s:dyncwd.' %*' + \ : '%#CtrlPStats# '.a:enum.' %* '.txt.'%=%<%#CtrlPMode2# %{getcwd()} %*' redraws endf " Paths {{{2