Skip to content

Commit

Permalink
Fixes #193194
Browse files Browse the repository at this point in the history
  • Loading branch information
hediet committed Sep 18, 2023
1 parent ae23e73 commit fd684a2
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ function computeUnchangedMoves(
for (extendToTop = 0; extendToTop < linesAbove; extendToTop++) {
const origLine = move.original.startLineNumber - extendToTop - 1;
const modLine = move.modified.startLineNumber - extendToTop - 1;
if (origLine > originalLines.length || modLine > modifiedLines.length) {
break;
}
if (modifiedSet.contains(modLine) || originalSet.contains(origLine)) {
break;
}
Expand All @@ -213,6 +216,9 @@ function computeUnchangedMoves(
for (extendToBottom = 0; extendToBottom < linesBelow; extendToBottom++) {
const origLine = move.original.endLineNumberExclusive + extendToBottom;
const modLine = move.modified.endLineNumberExclusive + extendToBottom;
if (origLine > originalLines.length || modLine > modifiedLines.length) {
break;
}
if (modifiedSet.contains(modLine) || originalSet.contains(origLine)) {
break;
}
Expand Down

0 comments on commit fd684a2

Please sign in to comment.