On 6 sept. 2014, at 10:08, Allan Odgaard mailinglist@textmate.org wrote:
On 5 Sep 2014, at 9:55, Eduardo Francos wrote:
I've found a document modified status issue when using "Replace all" with either project or folder Find in... dialogs […]
Would people be OK with Replace All (after a folder search) auto-saving changes (for non-open documents)? So it would never ask about saving and for open documents, it would do the replacement without saving anything, but for documents that have no open tab, it would simply operate on the data on disk.
That seems a good solution to me. Maybe it should handle opened but otherwise unmodified documents the same way as closed documents, and automatically save them as well. It should also be possible to add a .tm_properties setting to have all the files saved including those with an active editor window. Some may prefer to work that way.
Ideally after clicking Replace All the button would turn into Undo Replacements, which would give a way to revert the changes made to the non-open files.
An Undo Replacements could require making the Find in... dialog modal, otherwise the user may edit some files before closing the Find dialog, possibly rendering impossible a full and consistent undo operation. Alternatively, when the user modifies any document then the "Undo Replacements" button could be disabled.