mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 18:54:44 +08:00
fix position of call defs cursor
This commit is contained in:
@@ -212,14 +212,14 @@ def show_func_def(call_def=None, completion_lines=0):
|
|||||||
return
|
return
|
||||||
|
|
||||||
row, column = call_def.bracket_start
|
row, column = call_def.bracket_start
|
||||||
if column < 2 or row == 0:
|
if column < 1 or row == 0:
|
||||||
return # edge cases, just ignore
|
return # edge cases, just ignore
|
||||||
|
|
||||||
# TODO check if completion menu is above or below
|
# TODO check if completion menu is above or below
|
||||||
row_to_replace = row - 1
|
row_to_replace = row - 1
|
||||||
line = vim.eval("getline(%s)" % row_to_replace)
|
line = vim.eval("getline(%s)" % row_to_replace)
|
||||||
|
|
||||||
insert_column = column - 2 # because it has stuff at the beginning
|
insert_column = column - 1 # because there's a space before the bracket
|
||||||
|
|
||||||
params = [p.get_code().replace('\n', '') for p in call_def.params]
|
params = [p.get_code().replace('\n', '') for p in call_def.params]
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user