Given an IProjectFile instance and a line number in that file, what is the "right" way to create a TextRange for that line, suitable for passing to Navigator.NavigateTextRange()? Right now I'm opening the file and reading it, counting the character length of all lines until my line number, and pass
ing that sum to the TextRange ctor. But when I navigate to the location it's often short a couple lines. I'm guessing that perhaps my count is off due to line ending characters, and I could code for that, but perhaps there exists a better way?
Here where I compute the TextRange parameter.
And here's how I use it.
Original message URL: http://www.jetbrains.net/devnet/message/5230363#5230363