[meld] Swallow _find_next_chunk, unused elsewhere
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Swallow _find_next_chunk, unused elsewhere
- Date: Fri, 16 Dec 2011 22:38:57 +0000 (UTC)
commit 2cfb9f617e07d8578e8013cc8a9f3ef3722bf19c
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Dec 17 08:36:47 2011 +1000
Swallow _find_next_chunk, unused elsewhere
meld/filediff.py | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index cc7087b..64ebed6 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1617,16 +1617,6 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
self.queue_draw()
self.recompute_label()
- def _find_next_chunk(self, direction, pane):
- if direction == gtk.gdk.SCROLL_DOWN:
- target = self.cursor.next
- else: # direction == gtk.gdk.SCROLL_UP
- target = self.cursor.prev
-
- if target is None:
- return None
- return self.linediffer.get_chunk(target, pane)
-
def next_diff(self, direction):
pane = self._get_focused_pane()
if pane == -1:
@@ -1636,7 +1626,15 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
pane = 0
buf = self.textbuffer[pane]
- c = self._find_next_chunk(direction, pane)
+ if direction == gtk.gdk.SCROLL_DOWN:
+ target = self.cursor.next
+ else: # direction == gtk.gdk.SCROLL_UP
+ target = self.cursor.prev
+
+ if target is None:
+ return
+
+ c = self.linediffer.get_chunk(target, pane)
if c:
# Warp the cursor to the first line of next chunk
if self.cursor.line != c[1]:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]