# HG changeset patch # User Laurent Bessard # Date 1368655235 -7200 # Node ID b1c84771e1cf9a94198161046989d6ee2aaf9d79 # Parent 67df52302ea630fc23eda96e942324652ab173f9 Fixed bug when typing and caret is at last test position in CodeFileEditor diff -r 67df52302ea6 -r b1c84771e1cf editors/CodeFileEditor.py --- a/editors/CodeFileEditor.py Wed May 15 23:27:19 2013 +0200 +++ b/editors/CodeFileEditor.py Thu May 16 00:00:35 2013 +0200 @@ -295,7 +295,7 @@ # Test if caret is before Windows like new line text = self.GetText() - if ord(text[current_pos]) == 13: + if current_pos < len(text) and ord(text[current_pos]) == 13: newline_size = 2 else: newline_size = 1