I don't know much about RealBasic, does it have some kind of built-in undo for text fields? Would there be anyway to tell it not to put auto-indents into the undo stack?
Or you could just do away entirely with auto-indent and bring back the "format syntax" button. I wouldn't mind.