Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Keep the side by side limits in ui-ssdiff.c
Diffstat (limited to 'source/ui-ssdiff.c')
-rw-r--r--source/ui-ssdiff.c8
1 file changed, 8 insertions, 0 deletions
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;