1
0
forked from VimPlug/jedi

Exchange the completion trailer evaluation logic. It's way more consistent now.

This commit is contained in:
Dave Halter
2016-06-23 08:47:31 +02:00
parent cbef4235ff
commit 1ab4eb3696
4 changed files with 24 additions and 32 deletions
+2
View File
@@ -88,6 +88,8 @@ def call_of_leaf(leaf, cut_own_trailer=False):
# different trailers: `( x )`, `[ x ]` and `.x`. In the first two examples
# we should not match anything more than x.
if trailer.type != 'trailer' or leaf not in (trailer.children[0], trailer.children[-1]):
if trailer.type == 'atom':
return trailer
return leaf
power = trailer.parent