[meld] sourceview: Fix off-by-one drawing error for final line in file



commit b6b576eee20eddacdb7436c3049f8c7a356a7ce6
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Tue Dec 15 05:38:22 2015 +1000

    sourceview: Fix off-by-one drawing error for final line in file
    
    This code was apparently brought forward from the old drawing method,
    but is now no longer correct.

 meld/sourceview.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/sourceview.py b/meld/sourceview.py
index 6a3d0c1..79edd4f 100644
--- a/meld/sourceview.py
+++ b/meld/sourceview.py
@@ -136,7 +136,7 @@ class MeldSourceView(GtkSource.View):
         it = buf.get_iter_at_line(line)
         y, h = self.get_line_yrange(it)
         if line >= buf.get_line_count():
-            return y + h - 1
+            return y + h
         return y
 
     def get_line_num_for_y(self, y):


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