forked from VimPlug/jedi
Implement binary search for get_leaf_for_position. This makes it a lot faster.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user