Index: filediff.py
===================================================================
--- filediff.py	(Revision 1031)
+++ filediff.py	(Arbeitskopie)
@@ -1090,18 +1090,25 @@
         adjs = map( lambda x: x.get_vadjustment(), self.scrolledwindow)
         curline = self._pixel_to_line( 1, int(adjs[1].value + adjs[1].page_size/2) )
         c = None
+
+        def blank(lines):
+            for l in lines:
+                if l.strip():
+                    return False
+            return True
+                    
+        texts = self._get_texts()
         if direction == gdk.SCROLL_DOWN:
-            for c in self.linediffer.single_changes(1, self._get_texts()):
+            for c in self.linediffer.single_changes(1, texts):
                 assert c[0] != "equal"
-                c1,c2 = self._consume_blank_lines( self._get_texts()[1][c[1]:c[2]] )
-                if c[1]+c1 == c[2]-c2:
+
+                if blank(texts[1][c[1]:c[2]]) and blank(texts[c[-1]][c[3]:c[4]]):
                     continue
                 if c[1] > curline + 1:
                     break
         else: #direction == gdk.SCROLL_UP
-            for chunk in self.linediffer.single_changes(1, self._get_texts()):
-                c1,c2 = self._consume_blank_lines( self._get_texts()[1][chunk[1]:chunk[2]] )
-                if chunk[1]+c1 == chunk[2]-c2:
+            for chunk in self.linediffer.single_changes(1, texts):
+                if blank(texts[1][chunk[1]:chunk[2]]) and blank(texts[chunk[-1]][chunk[3]:chunk[4]]):
                     continue
                 if chunk[2] < curline:
                     c = chunk
