Jerry,
We tried all kind of combinations, reviewed the original source codes, but we are unable to reproduce the problem See attached screenshots. The demo application does not remove the leading spaces when replacing a line.
http://www.lindersoft.com/projects/jerrys_06.zip
I have uploaded one of our demo projects. Can you change it in such a way that it "fails"?
Thanks,
Friedrich