Index: filediff.py
===================================================================
RCS file: /cvs/gnome/meld/filediff.py,v
retrieving revision 1.58
diff -u -r1.58 filediff.py
--- filediff.py	28 Oct 2004 19:09:19 -0000	1.58
+++ filediff.py	12 Nov 2004 17:51:22 -0000
@@ -84,6 +71,20 @@
 
 MASK_SHIFT, MASK_CTRL, MASK_ALT = 1, 2, 3
 
+def consume_blank_lines(txt):
+    lo, hi = 0, 0
+    for l in txt:
+        if len(l)==0:
+            lo += 1
+        else:
+            break
+    for l in txt[lo:]:
+        if len(l)==0:
+            hi += 1
+        else:
+            break
+    return lo,hi
+
 class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
     """Two or three way diff of text files.
     """
@@ -898,6 +899,12 @@
 
         gc = area.meldgc.get_gc
         for c in self.linediffer.single_changes(textindex, self._get_texts()):
+            if self.prefs.ignore_blank_lines:
+                c1,c2 = consume_blank_lines( self._get_texts()[textindex][c[1]:c[2]] )
+                c = c[0], c[1]+c1,c[2]-c2
+                if c1==c2:
+                    continue
+
             assert c[0] != "equal"
             s,e = [int(x) for x in ( math.floor(scaleit(c[1])), math.ceil(scaleit(c[2]+(c[1]==c[2]))) ) ]
             window.draw_rectangle( gc(c[0]), 1, x0, s, x1, e-s)
@@ -1032,20 +1039,6 @@
         def bounds(idx):
             return [self._pixel_to_line(idx, pix_start[idx]), self._pixel_to_line(idx, pix_start[idx]+htotal)]
         visible = [None] + bounds(which) + bounds(which+1)
-
-        def consume_blank_lines(txt):
-            lo, hi = 0, 0
-            for l in txt:
-                if len(l)==0:
-                    lo += 1
-                else:
-                    break
-            for l in txt[lo:]:
-                if len(l)==0:
-                    hi += 1
-                else:
-                    break
-            return lo,hi
 
         for c in self.linediffer.pair_changes(which, which+1, self._get_texts()):
             if self.prefs.ignore_blank_lines:
