fix not all characters shown when line contains tabs
This commit is contained in:
@@ -504,12 +504,9 @@ class InnerBigText(QWidget):
|
|||||||
y_line_offset = self.char_height
|
y_line_offset = self.char_height
|
||||||
for line in self.lines:
|
for line in self.lines:
|
||||||
text = line.line_prepared_for_display()
|
text = line.line_prepared_for_display()
|
||||||
leftmost_visible_char_index = line.column_to_char(self._left_offset)
|
text = text[self._left_offset:self._left_offset + math.ceil(
|
||||||
rightmost_visible_char_index = line.column_to_char(self._left_offset + math.ceil(self.columns_shown()))
|
self.columns_shown())] # reduce string to the visible section before drawing
|
||||||
text = text[
|
|
||||||
leftmost_visible_char_index:rightmost_visible_char_index] # reduce string to the visible section before drawing
|
|
||||||
painter.drawText(0, y_line_offset, text)
|
painter.drawText(0, y_line_offset, text)
|
||||||
# painter.drawText(left_offset, y_line_offset, text)
|
|
||||||
y_line_offset = y_line_offset + self.char_height
|
y_line_offset = y_line_offset + self.char_height
|
||||||
|
|
||||||
painter.end()
|
painter.end()
|
||||||
|
|||||||
Reference in New Issue
Block a user