diff --git a/leo/core/commit_timestamp.json b/leo/core/commit_timestamp.json index d4e884a951..ed4a33174c 100644 --- a/leo/core/commit_timestamp.json +++ b/leo/core/commit_timestamp.json @@ -1,4 +1,4 @@ { - "asctime": "Fri Feb 23 13:25:22 UTC 2018", - "timestamp": "20180223132522" + "asctime": "Fri Feb 23 13:38:13 UTC 2018", + "timestamp": "20180223133813" } diff --git a/leo/core/leoFind.py b/leo/core/leoFind.py index 3b611b1cd5..98627dac42 100644 --- a/leo/core/leoFind.py +++ b/leo/core/leoFind.py @@ -485,14 +485,15 @@ def changeAllCommand(self, event=None): self.changeAll() # Fixes: #722 replace-all leaves unsaved changed files c = self.c - def has_dirty_descendant(p): - if p.isAnyAtFileNode(): - for p1 in p.self_and_subtree(): - if p1.v.isDirty(): return True - return False - for p in c.all_unique_positions(): - if not p.v.isDirty() and has_dirty_descendant(p): - p.v.setDirty(True) + dirtyvnodes = [v for v in c.fileCommands.gnxDict.values() if v.isDirty()] + def propagate(v): + for v1 in v.parents: + if not v1.isDirty(): + v1.setDirty(True) + propagate(v1) + for v in dirtyvnodes: + propagate(v) + #@+node:ekr.20150629072547.1: *4* find.preloadFindPattern def preloadFindPattern(self, w): '''Preload the find pattern from the selected text of widget w.'''