[meld] Don't draw the current-line highlight unless we have a cursor



commit 2ac266b62b8e6d9687aa12759042b8430d61fedb
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Mon Mar 15 08:15:59 2010 +1000

    Don't draw the current-line highlight unless we have a cursor
    
    When CursorDetails is initialised, it has all fields set to None. In
    this case, we shouldn't try to paint the current-line highlight.

 meld/filediff.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 8b6dd67..f630721 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -891,7 +891,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
             if change[1] > end_line: break
             draw_change(change)
 
-        if textview.is_focus():
+        if textview.is_focus() and self.cursor.line is not None:
             ypos, height = self._line_to_pixel_plus_height(pane, self.cursor.line)
             context.set_source_rgba(1,1,0,.25)
             context.rectangle(0,ypos-visible.y, width, height)



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