meld r1049 - trunk
- From: stevek svn gnome org
- To: svn-commits-list gnome org
- Subject: meld r1049 - trunk
- Date: Thu, 25 Sep 2008 20:15:28 +0000 (UTC)
Author: stevek
Date: Thu Sep 25 20:15:28 2008
New Revision: 1049
URL: http://svn.gnome.org/viewvc/meld?rev=1049&view=rev
Log:
Bug 553012 Changes in the first few lines are auto-skipped (Martin Renold)
Modified:
trunk/filediff.py
Modified: trunk/filediff.py
==============================================================================
--- trunk/filediff.py (original)
+++ trunk/filediff.py Thu Sep 25 20:15:28 2008
@@ -659,7 +659,7 @@
step = self.linediffer.set_sequences_iter(*lines)
while step.next() == None:
yield 1
- self.scheduler.add_task( lambda: self.next_diff(gdk.SCROLL_DOWN), True )
+ self.scheduler.add_task( lambda: self.next_diff(gdk.SCROLL_DOWN, jump_to_first=True), True )
self.queue_draw()
lenseq = [len(d) for d in self.linediffer.diffs]
self.scheduler.add_task( self._update_highlighting( (0,lenseq[0]), (0,lenseq[1]) ).next )
@@ -1086,9 +1086,12 @@
def _pixel_to_line(self, pane, pixel ):
return self.textview[pane].get_line_at_y( pixel )[0].get_line()
- def next_diff(self, direction):
+ def next_diff(self, direction, jump_to_first=False):
adjs = map( lambda x: x.get_vadjustment(), self.scrolledwindow)
curline = self._pixel_to_line( 1, int(adjs[1].value + adjs[1].page_size/2) )
+ if jump_to_first:
+ # curline already has some positive value due to scrollbar size
+ curline = -1
c = None
if direction == gdk.SCROLL_DOWN:
for c in self.linediffer.single_changes(1, self._get_texts()):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]