Index: Lib/idlelib/EditorWindow.py =================================================================== --- Lib/idlelib/EditorWindow.py (revision 68230) +++ Lib/idlelib/EditorWindow.py (working copy) @@ -315,6 +315,9 @@ first = self.text.index(dest) last = self.text.index("anchor") + if not last: + # The 'anchor' mark didn't exist up to this point. + last = self.text.index("sel.last") if self.text.compare(first,">",last): first,last = last,first