|
|
|
|
@ -151,10 +151,10 @@ namespace ICSharpCode.NRefactory.Editor
@@ -151,10 +151,10 @@ namespace ICSharpCode.NRefactory.Editor
|
|
|
|
|
if (line < 1 || line > lines.Length) |
|
|
|
|
throw new ArgumentOutOfRangeException("line", line, "Value must be between 1 and " + lines.Length); |
|
|
|
|
int lineStart = GetStartOffset(line); |
|
|
|
|
if (column <= 0) |
|
|
|
|
if (column <= 1) |
|
|
|
|
return lineStart; |
|
|
|
|
int lineEnd = GetEndOffset(line); |
|
|
|
|
if (column >= lineEnd - lineStart) |
|
|
|
|
if (column - 1 >= lineEnd - lineStart) |
|
|
|
|
return lineEnd; |
|
|
|
|
return lineStart + column - 1; |
|
|
|
|
} |
|
|
|
|
|