Merge changes from pull request #149

This commit is contained in:
David Vierra 2012-12-04 23:37:05 -10:00
commit 4746730db6

View File

@ -678,7 +678,7 @@ class TextEditorWrapped(Widget):
il = self.insertion_line il = self.insertion_line
if il is not None: if il is not None:
il = max(0, min(il, (len(self.textL)-1))) 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)) i = max(0, min(i, len(self.textL[il])-1))
return text, i, il return text, i, il