diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-04-07 13:53:49 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-04-07 13:53:49 (GMT) |
commit | 5a3c6dbe6a9c6100dcdf91e9773d50d97268e1ba (patch) | |
tree | fd50a3c04227f900de3224a1782872c1b7e6832e /Lib/idlelib/EditorWindow.py | |
parent | 20efcfaf538c52c7d65117bf8427b6b248c54dbe (diff) | |
parent | 8ab1e513c1451895afd95ef2e07905ab07dc9909 (diff) | |
download | cpython-5a3c6dbe6a9c6100dcdf91e9773d50d97268e1ba.zip cpython-5a3c6dbe6a9c6100dcdf91e9773d50d97268e1ba.tar.gz cpython-5a3c6dbe6a9c6100dcdf91e9773d50d97268e1ba.tar.bz2 |
merge heads
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 565cf36..148a1da 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -1433,6 +1433,7 @@ class EditorWindow(object): 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 @@ class EditorWindow(object): 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 @@ class EditorWindow(object): 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 |