Skip to content

Commit c027fcf

Browse files
committed
Missed a minor optimization as I wasn't using a parameter for the binary search method. The files I've opened don't actually hit the code path (they always hit the optimization for checking the previous/next/current line)
\n\nCommit migrated from dotnet/razor@75f34ee
1 parent 069b409 commit c027fcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/LineTrackingStringBuffer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ private TextLine ScanLines(int absoluteIndex, int startLineIndex, int endLineInd
138138
{
139139
// binary search for the line containing absoluteIndex
140140
var lowIndex = startLineIndex;
141-
var highIndex = _lines.Count;
141+
var highIndex = endLineIndex;
142142

143143
while (lowIndex != highIndex)
144144
{

0 commit comments

Comments
 (0)