[meld/ui-next] filediff: Remove existing diffmap coordinate helper



commit ebf31fb4c384b6057c55c52c3b756b14578794a4
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Mar 30 07:20:55 2019 +1000

    filediff: Remove existing diffmap coordinate helper
    
    This was used by DiffMap previously, and was just missed on removal.

 meld/filediff.py | 18 ------------------
 1 file changed, 18 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 212f1ed2..a815a824 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -2120,24 +2120,6 @@ class FileDiff(Gtk.VBox, MeldDoc):
             w.chunk_iter = chunk_iter(i)
             w.current_chunk_check = current_chunk_check(i)
 
-        def coords_iter(i):
-            buf_index = 2 if i == 1 and self.num_panes == 3 else i
-            get_end_iter = self.textbuffer[buf_index].get_end_iter
-            get_iter_at_line = self.textbuffer[buf_index].get_iter_at_line
-            get_line_yrange = self.textview[buf_index].get_line_yrange
-
-            def coords_by_chunk():
-                y, h = get_line_yrange(get_end_iter())
-                max_y = float(y + h)
-                for c in self.linediffer.single_changes(i):
-                    y0, _ = get_line_yrange(get_iter_at_line(c[1]))
-                    if c[1] == c[2]:
-                        y, h = y0, 0
-                    else:
-                        y, h = get_line_yrange(get_iter_at_line(c[2] - 1))
-                    yield c[0], y0 / max_y, (y + h) / max_y
-            return coords_by_chunk
-
         for (w, i) in zip(self.linkmap, (0, self.num_panes - 2)):
             w.associate(self, self.textview[i], self.textview[i + 1])
 


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