Use bufnr directly
This commit is contained in:
parent
9c88549e8b
commit
6863e650d4
@ -11,7 +11,7 @@ en
|
|||||||
let g:loaded_ctrlp_changes = 1
|
let g:loaded_ctrlp_changes = 1
|
||||||
|
|
||||||
cal add(g:ctrlp_ext_vars, {
|
cal add(g:ctrlp_ext_vars, {
|
||||||
\ 'init': 'ctrlp#changes#init(s:bufnr, s:crfile)',
|
\ 'init': 'ctrlp#changes#init(s:bufnr, s:crbufnr)',
|
||||||
\ 'accept': 'ctrlp#changes#accept',
|
\ 'accept': 'ctrlp#changes#accept',
|
||||||
\ 'lname': 'changes',
|
\ 'lname': 'changes',
|
||||||
\ 'sname': 'chs',
|
\ 'sname': 'chs',
|
||||||
@ -51,8 +51,8 @@ fu! s:syntax()
|
|||||||
en
|
en
|
||||||
endf
|
endf
|
||||||
" Public {{{1
|
" Public {{{1
|
||||||
fu! ctrlp#changes#init(original_bufnr, fname)
|
fu! ctrlp#changes#init(original_bufnr, bufnr)
|
||||||
let bufnr = exists('s:bufnr') ? s:bufnr : bufnr('^'.a:fname.'$')
|
let bufnr = exists('s:bufnr') ? s:bufnr : a:bufnr
|
||||||
let bufs = exists('s:clmode') && s:clmode ? ctrlp#buffers('id') : [bufnr]
|
let bufs = exists('s:clmode') && s:clmode ? ctrlp#buffers('id') : [bufnr]
|
||||||
cal filter(bufs, 'v:val > 0')
|
cal filter(bufs, 'v:val > 0')
|
||||||
let [swb, &swb] = [&swb, '']
|
let [swb, &swb] = [&swb, '']
|
||||||
|
Loading…
Reference in New Issue
Block a user