fix computation of text width
This commit is contained in:
11
line.py
11
line.py
@@ -22,4 +22,13 @@ class Line:
|
||||
def intersects(self, start_byte: int, end_byte: int):
|
||||
result = start_byte < self._byte_end and end_byte > self._byte_offset
|
||||
#print("%d,%d in %d,%d" % (start_byte, end_byte, self._byte_offset, self._byte_end))
|
||||
return result
|
||||
return result
|
||||
|
||||
def prefix(self, index: int) -> str:
|
||||
return self._line[0:index]
|
||||
|
||||
def substr(self, offset: int, length: int) -> str:
|
||||
return self._line[offset:offset+length]
|
||||
|
||||
def suffix(self, index: int) -> str:
|
||||
return self._line[index:]
|
||||
Reference in New Issue
Block a user