forked from VimPlug/jedi
Finding the autocompletion stack is a bit more complicated than I initially thought
Fixes #968.
This commit is contained in:
@@ -134,7 +134,7 @@ def get_stack_at_position(grammar, code_lines, module_node, pos):
|
|||||||
# completion.
|
# completion.
|
||||||
# Use Z as a prefix because it's not part of a number suffix.
|
# Use Z as a prefix because it's not part of a number suffix.
|
||||||
safeword = 'ZZZ_USER_WANTS_TO_COMPLETE_HERE_WITH_JEDI'
|
safeword = 'ZZZ_USER_WANTS_TO_COMPLETE_HERE_WITH_JEDI'
|
||||||
code = code + safeword
|
code = code + ' ' + safeword
|
||||||
|
|
||||||
p = Parser(grammar._pgen_grammar, error_recovery=True)
|
p = Parser(grammar._pgen_grammar, error_recovery=True)
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ int(str)
|
|||||||
str..
|
str..
|
||||||
#? []
|
#? []
|
||||||
a(0):.
|
a(0):.
|
||||||
|
#? 2 ['and', 'or', 'if', 'is', 'in', 'not']
|
||||||
|
0x0
|
||||||
|
#? ['and', 'or', 'if', 'is', 'in', 'not']
|
||||||
|
1j
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# if/else/elif
|
# if/else/elif
|
||||||
|
|||||||
Reference in New Issue
Block a user