diff -r 927afb7bca2a Lib/idlelib/EditorWindow.py --- a/Lib/idlelib/EditorWindow.py Sat Jan 05 21:20:29 2013 +0100 +++ b/Lib/idlelib/EditorWindow.py Mon Jan 07 14:52:27 2013 -0600 @@ -1433,6 +1433,7 @@ def tabify_region_event(self, event): head, tail, chars, lines = self.get_region() tabwidth = self._asktabwidth() + if tabwidth is None: return for pos in range(len(lines)): line = lines[pos] if line: @@ -1444,6 +1445,7 @@ def untabify_region_event(self, event): head, tail, chars, lines = self.get_region() tabwidth = self._asktabwidth() + if tabwidth is None: return for pos in range(len(lines)): lines[pos] = lines[pos].expandtabs(tabwidth) self.set_region(head, tail, chars, lines) @@ -1537,7 +1539,7 @@ parent=self.text, initialvalue=self.indentwidth, minvalue=2, - maxvalue=16) or self.tabwidth + maxvalue=16) # Guess indentwidth from text content. # Return guessed indentwidth. This should not be believed unless