diff --git a/src/ui/ColoredDiff.tsx b/src/ui/ColoredDiff.tsx
index d265b91ed..1dcae6de5 100644
--- a/src/ui/ColoredDiff.tsx
+++ b/src/ui/ColoredDiff.tsx
@@ -78,9 +78,12 @@ export const ColoredDiff: React.FC<{ diffContent: string }> = ({ diffContent })
(l) => l.type !== 'hunk' && l.type !== 'other',
);
+ const truncatedLines = displayableLines.slice(0, 16);
+ const isTruncated = displayableLines.length > 16;
+
return (
- {displayableLines.map((line, index) => {
+ {truncatedLines.map((line, index) => {
const lineKey = `diff-line-${index}`;
let gutterNumStr = '';
let prefixSymbol = ' ';
@@ -119,6 +122,11 @@ export const ColoredDiff: React.FC<{ diffContent: string }> = ({ diffContent })
);
})}
+ {isTruncated && (
+
+ ... ({displayableLines.length - 16} more lines)
+
+ )}
);
};
\ No newline at end of file