Posted 19 years ago
by Kasper

Okay, this is probably simple, but since I have already used more than 15 minutes to figure out what's wrong, I better ask :P. I get a line and a character value, and now I wish to set the cursor accordingly. Since I can't figure out a way to set the cursor to a character position within the line, I searched the forum and found out that I'm to use the PositionToOffset method. I know the line and character values I get are correct, since I can see in the editor that they fit - however, when I put them through PositionToOffset and set the StartOffset like this: Editor.SelectedView.Selection.StartOffset = offset;, the character is not in the right place. The returned offset is too high for some reason - why? :)