[meld] Fix initial cursor position setting in identical files (bgo#699309)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Fix initial cursor position setting in identical files (bgo#699309)
- Date: Sat, 4 May 2013 22:22:32 +0000 (UTC)
commit d402db9509a61b7439299b150c56ffca5eccfc9d
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun May 5 07:54:59 2013 +1000
Fix initial cursor position setting in identical files (bgo#699309)
meld/filediff.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 54784fa..b187aa5 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1159,7 +1159,14 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
self.cursor.next = next_
for buf in self.textbuffer:
buf.place_cursor(buf.get_start_iter())
- self.scheduler.add_task(lambda: self.next_diff(gtk.gdk.SCROLL_DOWN), True)
+
+ if self.cursor.next is not None:
+ self.scheduler.add_task(
+ lambda: self.next_diff(gtk.gdk.SCROLL_DOWN), True)
+ else:
+ buf = self.textbuffer[1 if self.num_panes > 1 else 0]
+ self.on_cursor_position_changed(buf, None, True)
+
self.queue_draw()
self._connect_buffer_handlers()
self._set_merge_action_sensitivity()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]