mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-18 21:41:25 +08:00
Change the backwards tokenizer that keywords always stop.
This commit is contained in:
1 parent
a940c31a86
commit
1326a2137d
1 file changed
+4
@@ -127,6 +127,10 @@ class UserContext(object):
|
|||||||
l = first_line if x == start_pos[0] else l
|
l = first_line if x == start_pos[0] else l
|
||||||
start_cursor = x, len(l) - end[1]
|
start_cursor = x, len(l) - end[1]
|
||||||
string += tok_str
|
string += tok_str
|
||||||
|
if keyword.iskeyword(tok_str[::-1]):
|
||||||
|
# Keywords should always stop. The path will always end with
|
||||||
|
# them.
|
||||||
|
break
|
||||||
last_type = tok_type
|
last_type = tok_type
|
||||||
|
|
||||||
# string can still contain spaces at the end
|
# string can still contain spaces at the end
|
||||||
|
|||||||
Reference in new issue
Block a user