[meld] Only request the line's y location for a slight speedup
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Only request the line's y location for a slight speedup
- Date: Thu, 25 Feb 2010 21:07:05 +0000 (UTC)
commit 84baaeb9f141ed2693aac8ef94720acd5e483a0b
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Dec 6 08:10:34 2009 +1000
Only request the line's y location for a slight speedup
meld/filediff.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index d0ab679..978d6ad 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1117,10 +1117,10 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
def _line_to_pixel(self, pane, line ):
it = self.textbuffer[pane].get_iter_at_line(line)
+ y, h = self.textview[pane].get_line_yrange(it)
if line >= self.textbuffer[pane].get_line_count():
- y, h = self.textview[pane].get_line_yrange( it )
return y + h - 1
- return self.textview[pane].get_iter_location( it ).y
+ return y
def _line_to_pixel_plus_height(self, pane, line ):
it = self.textbuffer[pane].get_iter_at_line(line)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]