![Avatar](https://secure.gravatar.com/avatar/b1a707268dd6ce9e2371fa413ad23127.jpg?s=64&d=identicon&r=g)
I have a button in my toolbar labeled "convert" which, when clicked, converts the source in the editor from VB to C#. The problem is that the undo stack seems to get cleared by this, so the user cannot undo this operation. Heres my code for the convert button:
string convertedCode = GetConvertedCode();
editor.Document.Language = new CSharpSyntaxLanguage();
editor.Document.LanguageData = GetLanguageData();
editor.Document.Text = convertedCode;
Can you tell me specifically why the undo stack clears?
string convertedCode = GetConvertedCode();
editor.Document.Language = new CSharpSyntaxLanguage();
editor.Document.LanguageData = GetLanguageData();
editor.Document.Text = convertedCode;
Can you tell me specifically why the undo stack clears?
George P Weihs