diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index ab0a24f..147ce98 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -68,9 +68,9 @@ fu! s:Open() let [s:crfile, s:crfpath] = [expand('%:p', 1), expand('%:p:h', 1)] let [s:crword, s:crline] = [expand(''), getline('.')] let [s:tagfiles, s:crcursor] = [s:tagfiles(), getpos('.')] - let s:crvisual = s:lastvisual() + let [s:crbufnr, s:crvisual] = [bufnr('%'), s:lastvisual()] + let s:currwin = s:mwbottom ? winnr() : winnr() + has('autocmd') sil! exe s:mwbottom ? 'bo' : 'to' '1new ControlP' - let s:currwin = s:mwbottom ? winnr('#') : winnr('#') + 1 let [s:bufnr, s:prompt] = [bufnr('%'), ['', '', '']] abc if !exists('s:hstry') @@ -97,7 +97,7 @@ fu! s:Close() exe s:winres unl! s:focus s:hisidx s:hstgot s:marked s:statypes s:cline s:init s:savestr \ s:crfile s:crfpath s:crword s:crvisual s:tagfiles s:crline s:crcursor - \ g:ctrlp_nolimit + \ g:ctrlp_nolimit s:crbufnr cal ctrlp#recordhist() ec endf diff --git a/doc/ctrlp.txt b/doc/ctrlp.txt index de4e616..f25dbf2 100644 --- a/doc/ctrlp.txt +++ b/doc/ctrlp.txt @@ -500,7 +500,7 @@ g) Submit ? to open this help file. Extensions are optional. To enable an extension, add its name to the variable g:ctrlp_extensions: > - let g:ctrlp_extensions = ['tag', 'quickfix', 'buffertag', 'dir'] + let g:ctrlp_extensions = ['tag', 'quickfix', 'dir'] < The order of the items will be the order they appear on the statusline and when using , .