Fix index out of bounds in get_text_and_insertion_data
Check size of textL before accessing.(cherry picked from commit db25b4131f3c042b3edc824550a2724433ea5b76)
This commit is contained in:
parent
3bf6868464
commit
20e7acd5d2
@ -677,7 +677,8 @@ class TextEditorWrapped(Widget):
|
|||||||
i = self.insertion_step
|
i = self.insertion_step
|
||||||
il = self.insertion_line
|
il = self.insertion_line
|
||||||
if i is not None:
|
if i is not None:
|
||||||
i = max(0, min(i, len(self.textL[il])))
|
if il < len(textL):
|
||||||
|
i = max(0, min(i, len(self.textL[il])))
|
||||||
return text, i, il
|
return text, i, il
|
||||||
|
|
||||||
def move_insertion_point(self, d):
|
def move_insertion_point(self, d):
|
||||||
|
Reference in New Issue
Block a user