Support of per buffer working path mode

Close #145
This commit is contained in:
Kien N 2012-02-22 00:41:08 +07:00
parent 7dbf7f2be9
commit 92b8c399dd
2 changed files with 4 additions and 1 deletions

View File

@ -689,7 +689,7 @@ fu! s:PrtSwitcher()
unl s:force
endf
fu! s:SetWD(...) "{{{1
let pathmode = s:pathmode
let pathmode = s:wpmode
if a:0 && strlen(a:1) | if type(a:1)
cal ctrlp#setdir(a:1) | retu
el
@ -1338,6 +1338,8 @@ fu! s:getenv()
let [s:winh, s:crcursor] = [min([s:mxheight, &lines]), getpos('.')]
let [s:crbufnr, s:crvisual] = [bufnr('%'), s:lastvisual()]
let s:currwin = s:mwbottom ? winnr() : winnr() + has('autocmd')
let s:wpmode = exists('b:ctrlp_working_path_mode')
\ ? b:ctrlp_working_path_mode : s:pathmode
if exists('g:ctrlp_extensions')
if index(g:ctrlp_extensions, 'undo') >= 0
\ && v:version > 702 && has('patch005') && exists('*undotree')

View File

@ -97,6 +97,7 @@ variable: >
.bzr/
_darcs/
0 - dont manage working directory.
Use b:ctrlp_working_path_mode (a |b:var|) to set this option for each buffer.
*'g:ctrlp_root_markers'*
Use this to set your own root markers in addition to the default ones. Your