forked from VimPlug/jedi-vim
Fix parameters missing from command line call signatures
Parameters (or ellipsis) should show up in call signatures even when the index of the current argument is unknown. Closes https://github.com/davidhalter/jedi-vim/pull/499.
This commit is contained in:
committed by
Daniel Hahler
parent
b3e91e8de2
commit
0c2831d9a6
10
jedi_vim.py
10
jedi_vim.py
@@ -450,10 +450,12 @@ def cmdline_call_signatures(signatures):
|
||||
max_msg_len -= 18
|
||||
max_msg_len -= len(signatures[0].call_name) + 2 # call name + parentheses
|
||||
|
||||
if max_msg_len < 0:
|
||||
if max_msg_len < (1 if params else 0):
|
||||
return
|
||||
elif index is None:
|
||||
pass
|
||||
text = escape(', '.join(params))
|
||||
if params and len(text) > max_msg_len:
|
||||
text = ELLIPSIS
|
||||
elif max_msg_len < len(ELLIPSIS):
|
||||
return
|
||||
else:
|
||||
@@ -498,8 +500,8 @@ def cmdline_call_signatures(signatures):
|
||||
else:
|
||||
vim_command(' echon "%s" | '
|
||||
'echohl Function | echon "%s" | '
|
||||
'echohl None | echon "()"'
|
||||
% (spaces, signatures[0].call_name))
|
||||
'echohl None | echon "(%s)"'
|
||||
% (spaces, signatures[0].call_name, text))
|
||||
|
||||
|
||||
@_check_jedi_availability(show_error=True)
|
||||
|
||||
Reference in New Issue
Block a user