Revert "Make large diffs open quickly and scroll as one surface (#3212)"

This reverts commit b599d38a77.
This commit is contained in:
Mohamed Boudra
2026-08-12 15:29:21 +02:00
parent b58ccf9269
commit 0ba7251280
17 changed files with 715 additions and 1715 deletions
-22
View File
@@ -2,28 +2,6 @@ interface HighlightLikeToken {
text: string;
}
interface StyledHighlightToken extends HighlightLikeToken {
style: string | null;
}
export function compactHighlightTokens(
tokens: readonly StyledHighlightToken[],
): StyledHighlightToken[] {
const compacted: StyledHighlightToken[] = [];
for (const token of tokens) {
if (token.text.length === 0) {
continue;
}
const previous = compacted.at(-1);
if (previous?.style === token.style) {
previous.text += token.text;
continue;
}
compacted.push({ text: token.text, style: token.style });
}
return compacted;
}
// Preserve row height when a gutter or diff cell is intentionally blank.
// Non-breaking space because the gutter <Text> uses numberOfLines={1}, which
// collapses a plain ASCII space to zero height on web.