Permalink
Browse files

fixed a few bugs in get_in_function_call caching

  • Loading branch information...
davidhalter committed Oct 20, 2012
1 parent 36fd73a commit 559491c3010f1f9691af839e80e7fa97c626ae7f
Showing with 5 additions and 4 deletions.
  1. +5 −4 jedi/api.py
View
@@ -449,10 +449,11 @@ def check_cache():
old_stmt = parser.module.get_statement_for_position(self.pos)
if old_stmt is None:
return None, 0
- new_call, new_index = check_user_stmt(user_stmt)
- if new_call:
- if str(new_call) == str(call) and index == new_index:
- return new_call, new_index
+ old_call, old_index = check_user_stmt(old_stmt)
+ if old_call:
+ if str(old_call) == str(call):
+ # return the index of the part_parser
+ return old_call, index
return None, 0
else:
raise NotFoundError()

0 comments on commit 559491c

Please sign in to comment.