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))
|
# # print("%s + %s = %s" % (line.byte_offset(), char_in_line, current_byte))
|
||||||
else:
|
else:
|
||||||
current_byte = self.model.byte_count()
|
current_byte = self.model.byte_count()
|
||||||
return current_byte
|
return SelectionPos(current_byte, True, 1)
|
||||||
|
|
||||||
def elided_text(self, text: str, width: int):
|
def elided_text(self, text: str, width: int):
|
||||||
w = width + self.font_metric.horizontalAdvance("…")
|
w = width + self.font_metric.horizontalAdvance("…")
|
||||||
@@ -557,7 +557,6 @@ class InnerBigText(QWidget):
|
|||||||
|
|
||||||
def _toggle_follow(self):
|
def _toggle_follow(self):
|
||||||
self._follow = not self._follow
|
self._follow = not self._follow
|
||||||
print(f"follow={self._follow}")
|
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
def _update_highlight_selected_text(self):
|
def _update_highlight_selected_text(self):
|
||||||
|
|||||||
@@ -177,3 +177,7 @@ ä---------ä----------ä---------ä----------ä---------ä----------ä--
|
|||||||
17
|
17
|
||||||
18
|
18
|
||||||
19
|
19
|
||||||
|
|
||||||
|
|
||||||
|
アンドレアス
|
||||||
|
アンドレアス
|
||||||
Reference in New Issue
Block a user