Fix match window position option

* Breaks returning to previous window if set to 0.
This commit is contained in:
Kien N 2011-12-05 19:34:15 +07:00
parent af22f30e39
commit f7322b3d12
2 changed files with 4 additions and 4 deletions

View File

@ -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('<cword>'), 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 <buffer>
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

View File

@ -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 <c-f>, <c-b>.