Posted 17 years ago
by Ashton
-
Developer,
Schema Solutions LLC
![Avatar](https://secure.gravatar.com/avatar/8e7d0f61b46b7f003809e35f1e0ef810.jpg?s=64&d=identicon&r=g)
I have an issue where I invoke a snippet and then immediately after invoking a call Undo on the document and the problem I get is that in the OnCodeSnippetFieldDeactivating for this snippet I am replace the text the user entered with some generated text and it seems to be getting into an infinite loop and eventually generates a StackOverflow exception (when I try to set the text using SelectedView.ReplaceSelectedText it invokes the OnCodeSnippetFieldDeactivating event again)
Is there a way in the event to tell that an Undo action is happening and not to do anything?
Is there a way in the event to tell that an Undo action is happening and not to do anything?