--- a/TextViewer.py Sun Jan 08 19:22:26 2012 +0100
+++ b/TextViewer.py Sun Jan 08 19:28:00 2012 +0100
@@ -767,7 +767,7 @@
if self.TextSyntax in ["ST", "ALL"]:
indent = self.Editor.GetLineIndentation(line)
if LineStartswith(lineText.strip(), self.BlockStartKeywords):
- indent += 2
+ indent = (indent / 2 + 1) * 2
self.Editor.AddText("\n" + " " * indent)
key_handled = True
elif key == wx.WXK_BACK:
@@ -775,7 +775,7 @@
indent = self.Editor.GetLineIndentation(line)
if lineText.strip() == "" and indent > 0:
self.Editor.DelLineLeft()
- self.Editor.AddText(" " * max(0, indent - 2))
+ self.Editor.AddText(" " * ((max(0, indent - 1) / 2) * 2))
key_handled = True
if not key_handled:
event.Skip()