Posted 13 years ago
by Tobias Lingemann
-
Software Devolpment Engineer,
Vector Informatik GmbH
Version: 4.0.0289
Hi,
I need to provide my compiler with the current offset.
Since SyntaxEditor only stores newline as line terminator, the offset I get does not consider any carriage returns and my compiler gets a wrong offset.
For example the offset after "Foo\r\nBar" is 8 but because of SyntaxEditor's internal representation I get a value of 7.
Is there a way to translate the internal offset to the real offset?
And DocumentPosition only contains the line number, but not the offset from the beginning of the line. If I could get that, I could work around the issue.
[Modified at 09/07/2011 08:02 AM]
I need to provide my compiler with the current offset.
Since SyntaxEditor only stores newline as line terminator, the offset I get does not consider any carriage returns and my compiler gets a wrong offset.
For example the offset after "Foo\r\nBar" is 8 but because of SyntaxEditor's internal representation I get a value of 7.
Is there a way to translate the internal offset to the real offset?
And DocumentPosition only contains the line number, but not the offset from the beginning of the line. If I could get that, I could work around the issue.
[Modified at 09/07/2011 08:02 AM]
Best regards, Tobias Lingemann.