
Hi,
I am trying to do multiple replacements inside one undoable action.
For this I am using the ITextChange from Document.CurrentSnapshot.CreateTextChange().
Before the actual replaces I search my strings and store their positions inside a list of TextPositionRange.
If I replace my strings with some string having the same number of characters, it will work. If I replace with string.Empty, it will replace in the old positions so the replacing will be wrong. Somehow I need to update the ITextChange so the PositionToOffset() to get me the correct offsets. The offsets seems to change after each replace the ITextChange is doing.
Kind regards,
Daniel