Skip to content

Commit

Permalink
Improved fix for #722
Browse files Browse the repository at this point in the history
This is lot faster

Leo build: 20180223133813
  • Loading branch information
vitalije committed Feb 23, 2018
1 parent f3949aa commit 4a815ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions 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"
}
17 changes: 9 additions & 8 deletions leo/core/leoFind.py
Expand Up @@ -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.'''
Expand Down

0 comments on commit 4a815ce

Please sign in to comment.