From 5fdfcb51bf04521b7f0e6b5be5eb0a89fcee08e9 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 13:37:36 -0700 Subject: Keep the side by side limits in ui-ssdiff.c --- source/ui-ssdiff.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/ui-ssdiff.c') diff --git a/source/ui-ssdiff.c b/source/ui-ssdiff.c index 4bddb9d..90498b7 100644 --- a/source/ui-ssdiff.c +++ b/source/ui-ssdiff.c @@ -14,6 +14,14 @@ #include "ui-shared.h" #include "ui-ssdiff.h" +// The longest old line and the longest new line the view will compare +// character by character. The comparison fills a cell for every pair of +// characters, so its cost is the product of the two, and a line past the limit +// is shown whole instead. +#define MAX_SSDIFF_M 128 +#define MAX_SSDIFF_N 128 +#define MAX_SSDIFF_SIZE (MAX_SSDIFF_M * MAX_SSDIFF_N) + // One line held back until its run ends, owning the copy taken of it. struct deferred_line { int line_no; -- cgit