mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2026-10-10 23:29:31 +08:00
Find __doc__ window if opened in current tab
This commit is contained in:
1 parent
c32844dfec
commit
1792fb9e1b
1 file changed
+9
-3
+9
-3
@@ -48,9 +48,15 @@ endfun
|
||||
function! jedi#show_documentation()
|
||||
Python jedi_vim.show_documentation()
|
||||
|
||||
if bufnr("__doc__") > 0
|
||||
" If the __doc__ buffer is open in the current window, jump to it
|
||||
silent execute "sbuffer ".bufnr("__doc__")
|
||||
let bn = bufnr("__doc__")
|
||||
if bn > 0
|
||||
let wi=index(tabpagebuflist(tabpagenr()), bn))
|
||||
if wi >= 0
|
||||
" If the __doc__ buffer is open in the current tab, jump to it
|
||||
silent execute (wi+1).'wincmd w'
|
||||
else
|
||||
silent execute "sbuffer ".bn
|
||||
endif
|
||||
else
|
||||
split '__doc__'
|
||||
endif
|
||||
|
||||
Reference in new issue
Block a user