fix exception when selecting text by clicking behind the last character
This commit is contained in:
@@ -479,7 +479,7 @@ class InnerBigText(QWidget):
|
||||
# # print("%s + %s = %s" % (line.byte_offset(), char_in_line, current_byte))
|
||||
else:
|
||||
current_byte = self.model.byte_count()
|
||||
return current_byte
|
||||
return SelectionPos(current_byte, True, 1)
|
||||
|
||||
def elided_text(self, text: str, width: int):
|
||||
w = width + self.font_metric.horizontalAdvance("…")
|
||||
@@ -557,7 +557,6 @@ class InnerBigText(QWidget):
|
||||
|
||||
def _toggle_follow(self):
|
||||
self._follow = not self._follow
|
||||
print(f"follow={self._follow}")
|
||||
self.update()
|
||||
|
||||
def _update_highlight_selected_text(self):
|
||||
|
||||
Reference in New Issue
Block a user