[meld] Use cursor position change rather than manual trigger for diff recalc
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Use cursor position change rather than manual trigger for diff recalc
- Date: Sun, 20 Jan 2013 01:17:59 +0000 (UTC)
commit 5d4315d15f98c348b5be0d62a77662eefa5c4db1
Author: Kai Willadsen <kai willadsen gmail com>
Date: Wed Jan 16 07:21:21 2013 +1000
Use cursor position change rather than manual trigger for diff recalc
Manually triggering a diff-change when a buffer was set editable was
problematic in cases where we're loading a new file. In this situation,
the current diff chunk was set to an invalid index in the newly-reset
differ, as the current chunk isn't invalidated.
This commit forces the diff-change recalculation by instead forcing a
cursor chunk change, which is how we do this elsewhere in the
codebase.
meld/filediff.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index a79099b..7a7df39 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1461,7 +1461,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
index = self.textbuffer.index(buf)
self.readonlytoggle[index].set_active(not editable)
self.textview[index].set_editable(editable)
- self.on_current_diff_changed(self)
+ self.on_cursor_position_changed(buf, None, True)
for linkmap in self.linkmap:
linkmap.queue_draw()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]