forked from VimPlug/jedi
small clean up in the user context backwards tokenizer
This commit is contained in:
@@ -72,6 +72,7 @@ class UserContext(object):
|
|||||||
tok_type = tok.type
|
tok_type = tok.type
|
||||||
tok_str = tok.string
|
tok_str = tok.string
|
||||||
end = tok.end_pos
|
end = tok.end_pos
|
||||||
|
self._column_temp = self._line_length - end[1]
|
||||||
if is_first:
|
if is_first:
|
||||||
if tok.start_pos != (1, 0): # whitespace is not a path
|
if tok.start_pos != (1, 0): # whitespace is not a path
|
||||||
return u(''), start_cursor
|
return u(''), start_cursor
|
||||||
@@ -102,14 +103,12 @@ class UserContext(object):
|
|||||||
elif tok_type == tokenize.NUMBER:
|
elif tok_type == tokenize.NUMBER:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
self._column_temp = self._line_length - end[1]
|
|
||||||
break
|
break
|
||||||
|
|
||||||
x = start_pos[0] - end[0] + 1
|
x = start_pos[0] - end[0] + 1
|
||||||
l = self.get_line(x)
|
l = self.get_line(x)
|
||||||
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]
|
||||||
self._column_temp = self._line_length - end[1]
|
|
||||||
string += tok_str
|
string += tok_str
|
||||||
last_type = tok_type
|
last_type = tok_type
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user