[meld] Reduce inline highlighting length limit



commit 4a907293d32d151f65517da8bc2f9a1887fa5ee5
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Jan 8 06:51:46 2011 +1000

    Reduce inline highlighting length limit
    
    This commit reduces the length limit at which we don't bother to try to
    highlight changes inline, by considering the sum of chunk lengths. This
    also fixes certain slow cases of comparing short chunks against
    close-to-the-limit chunks.

 meld/filediff.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index a7fea3d..cd05c69 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1017,7 +1017,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
 
                     # For very long sequences, bail rather than trying a very slow comparison
                     inline_limit = 8000 # arbitrary constant
-                    if len(text1) > inline_limit and len(textn) > inline_limit:
+                    if len(text1) + len(textn) > inline_limit:
                         for i in range(2):
                             bufs[i].apply_tag(tags[i], starts[i], ends[i])
                         continue



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]