[meld] sourceview: Rename variables to differentiate buffer and clip coords



commit 223fa2c2f9d80115cc81256e9f7b4ed107b63a49
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Oct 10 06:56:57 2015 +1000

    sourceview: Rename variables to differentiate buffer and clip coords

 meld/sourceview.py |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/meld/sourceview.py b/meld/sourceview.py
index 0d142f3..05dbcab 100644
--- a/meld/sourceview.py
+++ b/meld/sourceview.py
@@ -174,13 +174,13 @@ class MeldSourceView(GtkSource.View):
         context.save()
         context.set_line_width(1.0)
 
-        _, rect = Gdk.cairo_get_clip_rectangle(context)
-        _, y = self.window_to_buffer_coords(
-            Gtk.TextWindowType.WIDGET, 0, rect.y)
-        _, y_end = self.window_to_buffer_coords(
-            Gtk.TextWindowType.WIDGET, 0, rect.y + rect.height)
-        bounds = (self.get_line_num_for_y(y),
-                  self.get_line_num_for_y(y_end))
+        _, clip = Gdk.cairo_get_clip_rectangle(context)
+        _, buffer_y = self.window_to_buffer_coords(
+            Gtk.TextWindowType.WIDGET, 0, clip.y)
+        _, buffer_y_end = self.window_to_buffer_coords(
+            Gtk.TextWindowType.WIDGET, 0, clip.y + clip.height)
+        bounds = (self.get_line_num_for_y(buffer_y),
+                  self.get_line_num_for_y(buffer_y_end))
 
         visible = self.get_visible_rect()
         width = self.get_allocation().width


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