From 64d0223aa080c2b0c669a389ea91d20d72310106 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Fri, 21 Feb 2025 18:40:17 +0100 Subject: [PATCH] Clamp diffs lines after merging --- src/views/conflicts-resolution/diff.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/views/conflicts-resolution/diff.ts b/src/views/conflicts-resolution/diff.ts index 30643b5..bbf5287 100644 --- a/src/views/conflicts-resolution/diff.ts +++ b/src/views/conflicts-resolution/diff.ts @@ -87,10 +87,8 @@ function diff(oldText: string, newText: string): DiffChunk[] { } } - return mergeDiffs( - result.map((chunk) => - clampChunkLines(chunk, oldLines.length, newLines.length), - ), + return mergeDiffs(result).map((chunk) => + clampChunkLines(chunk, oldLines.length, newLines.length), ); }