mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 23:04:09 +02:00
Made Replace in Files properly save files
This commit is contained in:
parent
6e485e5766
commit
89e6b0d577
2 changed files with 63 additions and 37 deletions
|
@ -623,8 +623,10 @@ namespace IDE.ui
|
|||
int replaceInFileCount = 0;
|
||||
var editData = gApp.GetEditData(filePath);
|
||||
|
||||
bool hasUnsavedChanges = editData.HasTextChanged();
|
||||
|
||||
globalUndoData.mFileEditDatas.Add(editData);
|
||||
var sourceEditBatchHelper = scope:: SourceEditBatchHelper(editData.mEditWidget, "#renameSymbol", new GlobalUndoAction(editData, globalUndoData));
|
||||
var sourceEditBatchHelper = scope:: SourceEditBatchHelper(editData.mEditWidget, "#renameInFiles", new GlobalUndoAction(editData, globalUndoData));
|
||||
|
||||
bool matchCase = mSearchOptions.mMatchCase;
|
||||
|
||||
|
@ -698,6 +700,11 @@ namespace IDE.ui
|
|||
|
||||
sourceEditBatchHelper.Finish();
|
||||
|
||||
if (!hasUnsavedChanges)
|
||||
{
|
||||
gApp.SaveFile(editData);
|
||||
}
|
||||
|
||||
if ((IDEApp.IsBeefFile(filePath)) && (gApp.mBfResolveCompiler != null))
|
||||
{
|
||||
for (var projectSource in editData.mProjectSources)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue