mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-28 06:33:17 +08:00
More positioning for backwards tokenizer.
This commit is contained in:
1 parent
d918f8be73
commit
9cdf6de206
1 file changed
+3
-1
@@ -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