mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-18 03:25:55 +08:00
More positioning for backwards tokenizer.
This commit is contained in:
@@ -55,7 +55,9 @@ class UserContext(object):
|
|||||||
column = start_pos[1] - tok_start_pos[1]
|
column = start_pos[1] - tok_start_pos[1]
|
||||||
else:
|
else:
|
||||||
column = len(line) - tok_start_pos[1]
|
column = len(line) - tok_start_pos[1]
|
||||||
column -= len(tok_str)
|
# Multi-line docstrings must be accounted for.
|
||||||
|
first_line = (tok_str.splitlines() or [''])[0]
|
||||||
|
column -= len(first_line)
|
||||||
# Reverse the token again, so that it is in normal order again.
|
# Reverse the token again, so that it is in normal order again.
|
||||||
yield typ, tok_str[::-1], (self._line_temp, column), prefix
|
yield typ, tok_str[::-1], (self._line_temp, column), prefix
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user