1
0
forked from VimPlug/jedi

Implement binary search for get_leaf_for_position. This makes it a lot faster.

This commit is contained in:
Dave Halter
2017-01-25 22:27:36 +01:00
parent f2db0dceb4
commit 4918fb49f5
3 changed files with 27 additions and 24 deletions

View File

@@ -258,6 +258,8 @@ def generate_tokens(readline, use_exact_op_types=False):
# If a literal starts but doesn't end the whole rest of the
# line is an error token.
txt = line[pos:]
if txt.endswith('\n'):
new_line = True
yield TokenInfo(ERRORTOKEN, txt, (lnum, pos), prefix)
break