1
0
forked from VimPlug/jedi

fix help when in column zero

This commit is contained in:
David Hotham
2023-03-12 14:21:09 +00:00
parent b814ca2951
commit 0fbc2aafa3
2 changed files with 11 additions and 0 deletions

View File

@@ -369,6 +369,12 @@ class Script:
if definitions:
return definitions
leaf = self._module_node.get_leaf_for_position((line, column))
if leaf is not None and leaf.end_pos == (line, column) and leaf.type == 'newline':
next_ = leaf.get_next_leaf()
if next_ is not None and next_.start_pos == leaf.end_pos:
leaf = next_
if leaf is not None and leaf.type in ('keyword', 'operator', 'error_leaf'):
def need_pydoc():
if leaf.value in ('(', ')', '[', ']'):