[TxMt] File status after a replace all

Eduardo Francos efrancos at efrancos.com
Fri Sep 5 07:55:33 UTC 2014


Hi,
I've found a document modified status issue when using "Replace all" with either project or folder Find in... dialogs

When the Replace All button is clicked all the matches are applied to the documents containing them, but the status of the affected documents (which where not modified before issuing the command) does not change to "modified" as it could be expected.

When you close the Find in... dialog it shows a dialog box with the option to save the affected documents.
The text in the dialog states that the changes will be lost if you don't save them, which is actually incorrect, or at least misleading, because if you select not to save the documents they still include the applied changes. Their "modified" status though doesn't reflect this.

To reproduce the bug just open two or more files that contain a common string, open a Find in... dialog and do a replace all of that string, check the documents' statuses.

Unless I'm missing something obvious I believe that the additional "save documents" dialog is a lot of work just to save the "⌥⌘S" I'd issue anyway in most cases, but not always.
Also, given that the Find in... dialogs aren't modal, so the user can switch back to the documents and continue working, when he gets back to the Find dialog and closes it he may not always remember the context in which he executed the replace operation. When that happens my " keep the control" attitude always forces me to select not to save them ;-)
If a builtin "save changes" option is nevertheless required then I believe that an additional "Replace All & Save" button could be more effective.
To minimize real estate usage this button could be placed immediately to the right of the Replace All button with just "& Save" as the label. Alternatively, given that in this case the "Replace & Find" action button is apparently always disabled it could simply replace it.

Thanks
Gualo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20140905/689083d7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.macromates.com/textmate/attachments/20140905/689083d7/attachment.asc>


More information about the textmate mailing list