Fix index out-of-range in get_text_and_insertion_data
Added check for empty list textL.(cherry picked from commit 2bf4030381eb4837e1ad3e4d50d479a95c87b972)
This commit is contained in:
parent
753afc9317
commit
eff9dff826
@ -678,7 +678,7 @@ class TextEditorWrapped(Widget):
|
||||
il = self.insertion_line
|
||||
if il is not None:
|
||||
il = max(0, min(il, (len(self.textL)-1)))
|
||||
if i is not None and il is not None:
|
||||
if i is not None and il is not None and len(self.textL) > 0:
|
||||
i = max(0, min(i, len(self.textL[il])-1))
|
||||
return text, i, il
|
||||
|
||||
|
Reference in New Issue
Block a user