Let's say that I have a RichTextBox and its contents take up about 3 times the height compared to the visible height. There's no color formatting, I want to highlight keywords. If I use SelectionStart, SelectionLength and SelectionColor, then I have to set SelectionStart back to the caret's original position.
If, for example, I'm looking at the first page and my caret is half-way down the page, but I want a keyword highlighted near the end, when the caret is returned, the RichTextBox will only scroll up far enough for the caret to be on the top visible line, so my visible position has moved.
Is there any way for me to format colors out of view without affecting the view position? Or, is there any way for me to get and set/reset the view position after formatting?