SOme other info. Once you got an SourceEditor, it has an EditrorComponetn property or similar.
It always is a SynEdit, but you need to typecast.
On SynEdit, use TextBetweenPoint property, or related procedures to edit text (that captures undo info).
Don't access Lines to write text.