[Checkins] SVN: z3c.pt/trunk/z3c/pt/io.py Prevent cooking on trivial indentation.

Malthe Borch mborch at gmail.com
Sat Dec 22 19:56:49 EST 2007


Log message for revision 82406:
  Prevent cooking on trivial indentation.

Changed:
  U   z3c.pt/trunk/z3c/pt/io.py

-=-
Modified: z3c.pt/trunk/z3c/pt/io.py
===================================================================
--- z3c.pt/trunk/z3c/pt/io.py	2007-12-23 00:08:28 UTC (rev 82405)
+++ z3c.pt/trunk/z3c/pt/io.py	2007-12-23 00:56:49 UTC (rev 82406)
@@ -38,12 +38,14 @@
         return var
         
     def indent(self, amount=1):
-        self.cook()
-        self.indentation += amount
+        if amount > 0:
+            self.cook()
+            self.indentation += amount
 
     def outdent(self, amount=1):
-        self.cook()
-        self.indentation -= amount
+        if amount > 0:
+            self.cook()
+            self.indentation -= amount
 
     def out(self, string):
         self.queue += string



More information about the Checkins mailing list