mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-15 23:07:08 +08:00
add_goto_window: pass len of list and use min()
With less than `g:jedi#quickfix_window_height` entries in quickfix list, this now only makes the window that large, effectively saving screen space.
This commit is contained in:
@@ -96,10 +96,11 @@ endfunction
|
||||
" helper functions
|
||||
" ------------------------------------------------------------------------
|
||||
|
||||
function! jedi#add_goto_window()
|
||||
function! jedi#add_goto_window(len)
|
||||
set lazyredraw
|
||||
cclose
|
||||
execute 'belowright copen '.g:jedi#quickfix_window_height
|
||||
let height = min([a:len, g:jedi#quickfix_window_height])
|
||||
execute 'belowright copen '.height
|
||||
set nolazyredraw
|
||||
if g:jedi#use_tabs_not_buffers == 1
|
||||
noremap <buffer> <CR> :call jedi#goto_window_on_enter()<CR>
|
||||
|
||||
Reference in New Issue
Block a user