Skip to content

Commit cbe7ef2

Browse files
author
Michael Obermeyer
committed
Fixed an off-by-one error.
1 parent 844378e commit cbe7ef2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

JScript vsdoc Stub Generator 11/StubUtils.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ private static int GetTypeScriptFunctionLine(ITextSnapshot capture, int lineNumb
150150
var parenBlock = GetCompleteParenBlock(capture, lineNumber, line.Start + lineText.IndexOf("("));
151151
if (parenBlock == null) { return -1; }
152152

153-
// add one because GetCompleteParenBlock excludes closing parenthesis.
154-
var endParamsPosition = line.Start.Position + parenOpen + parenBlock.Length + 1;
153+
var endParamsPosition = line.Start.Position + parenOpen + parenBlock.Length;
155154

156155
var lineEnd = capture.GetLineFromPosition(endParamsPosition);
157156
var startTextAfterParams = endParamsPosition + 1;

0 commit comments

Comments
 (0)