[meld] filediff: Don't reset saving state from while-closing saves
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] filediff: Don't reset saving state from while-closing saves
- Date: Sat, 17 Feb 2018 22:11:15 +0000 (UTC)
commit c645afe63a651066cf47888551f2c6cf01879e44
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Feb 18 08:01:34 2018 +1000
filediff: Don't reset saving state from while-closing saves
The bug here looks something like:
* Compare files a, b and c
* Modify b and c
* Close the tab; when prompted to save, save both b and c
* Both files will be saved, but the tab won't close
The problem here was that we were resetting the state to Normal when
a save succeeded. This doesn't cause an issue if you're only saving
one file, but if you're saving multiple then the second save to run
*won't* be in a Closing state in its saved callback, and so won't
try to close the tab.
meld/filediff.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index b87148eb..0d43ebaf 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1644,9 +1644,9 @@ class FileDiff(MeldDoc, Component):
if pane == 1 and self.num_panes == 3:
self.meta['middle_saved'] = True
- if (self.state == ComparisonState.Closing and
- not any(b.get_modified() for b in self.textbuffer)):
- self.on_delete_event()
+ if self.state == ComparisonState.Closing:
+ if not any(b.get_modified() for b in self.textbuffer):
+ self.on_delete_event()
else:
self.state = ComparisonState.Normal
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]