From 4095d0efef0abc07de12dce32443b8d0a315e1b9 Mon Sep 17 00:00:00 2001 From: petobens Date: Thu, 12 Mar 2015 12:23:12 -0300 Subject: [PATCH 1/2] Add variable to control the height of the buffer showing documentation --- autoload/jedi.vim | 7 +++++-- doc/jedi-vim.txt | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/autoload/jedi.vim b/autoload/jedi.vim index a2172bf..7ddf2a1 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -233,8 +233,11 @@ function! jedi#show_documentation() setlocal nomodified setlocal filetype=rst - if l:doc_lines > 30 " max lines for plugin - let l:doc_lines = 30 + if !exists('g:jedi#max_doc_height') + let g:jedi#max_doc_height = 30 + endif + if l:doc_lines > g:jedi#max_doc_height " max lines for plugin + let l:doc_lines = g:jedi#max_doc_height endif execute "resize ".l:doc_lines diff --git a/doc/jedi-vim.txt b/doc/jedi-vim.txt index 82e24f1..e450a29 100644 --- a/doc/jedi-vim.txt +++ b/doc/jedi-vim.txt @@ -280,7 +280,8 @@ Function: `jedi#show_documentation()` Default: Show pydoc documentation This shows the pydoc documentation for the item currently under the cursor. -The documentation is opened in a horizontally split buffer. +The documentation is opened in a horizontally split buffer. The height of this +buffer is controlled by `g:jedi#max_doc_height` (set by default to 30). ------------------------------------------------------------------------------ 5.5. `g:jedi#rename_command` *g:jedi#rename_command* From 65c06553fddffd94063e33a2cad6a474263f9500 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 2 May 2015 10:41:31 +0200 Subject: [PATCH 2/2] Move max_doc_height default to s:default_settings --- autoload/jedi.vim | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/autoload/jedi.vim b/autoload/jedi.vim index 7ddf2a1..cd4b8eb 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -28,6 +28,7 @@ let s:default_settings = { \ 'show_call_signatures': 1, \ 'call_signature_escape': "'=`='", \ 'auto_close_doc': 1, + \ 'max_doc_height': 30, \ 'popup_select_first': 1, \ 'quickfix_window_height': 10, \ 'completions_enabled': 1, @@ -233,9 +234,6 @@ function! jedi#show_documentation() setlocal nomodified setlocal filetype=rst - if !exists('g:jedi#max_doc_height') - let g:jedi#max_doc_height = 30 - endif if l:doc_lines > g:jedi#max_doc_height " max lines for plugin let l:doc_lines = g:jedi#max_doc_height endif