I open a text file and scroll down without making any selection, then change the syntax language. The editor jumps back to the start of the document. It doesn't do this if I have made a selection. I would expect there to be no change in the position of the text in the window.
A cut down version of the code is
DynamicSyntaxLanguage language = DynamicSyntaxLanguage.LoadFromXml(stream, 0);
syntaxEditor.Document.Language = language;
language.IsUpdating = true;
... changes to lexical states
language.IsUpdating = false;
I tried saving and restoring these, but then it jumps to the top and quicky jumps back down again. It looks pretty bad.
syntaxEditor.SelectedView.FirstVisibleDisplayLineIndex;
syntaxEditor.SelectedView.FirstVisibleX;
Thanks