From eff9dff82604fc6d681265cfa14fda985e179773 Mon Sep 17 00:00:00 2001 From: KaboPC Date: Mon, 3 Dec 2012 19:33:52 -0500 Subject: [PATCH] Fix index out-of-range in get_text_and_insertion_data Added check for empty list textL.(cherry picked from commit 2bf4030381eb4837e1ad3e4d50d479a95c87b972) --- albow/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/albow/fields.py b/albow/fields.py index cf8691e..348ffb3 100644 --- a/albow/fields.py +++ b/albow/fields.py @@ -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