This commit is contained in:
chrys 2018-06-10 20:00:14 +02:00
parent 6fade1a98e
commit 9ab9b55e86

View File

@ -24,11 +24,15 @@ class textManager():
if line[:offset + 1].count('') > line[offset + 1:].count(''): if line[:offset + 1].count('') > line[offset + 1:].count(''):
offset = xCursor - 1 offset = xCursor - 1
start = line[:offset + 1].rfind('') + 1 start = line[:offset + 1].rfind('') + 1
end = line[offset + 1:].find('') + offset + 1 end = line[offset + 1:].find('')
if start == end:
return line
if start == -1: if start == -1:
return line return line
if end == -1: if end == -1:
return line return line
else:
end += offset + 1
if not self.hasBarrier(start, end): if not self.hasBarrier(start, end):
return line return line
return line[start:end] return line[start:end]