Fix Recent Files List not revised issue after "Save As" command

Fix #10946, close #10994
This commit is contained in:
Rajendra Singh 2022-01-04 22:11:19 +05:30 committed by Don Ho
parent 0dd0a9586a
commit 23b2a3fa8e
1 changed files with 7 additions and 0 deletions

View File

@ -1717,6 +1717,13 @@ bool Notepad_plus::fileSaveAs(BufferID id, bool isSaveCopy)
{
_lastRecentFileList.add(origPathname.c_str());
}
// If file is replaced then remove it from recent list
if (res && !isSaveCopy)
{
_lastRecentFileList.remove(fn.c_str());
}
return res;
}
else //cannot save, other view has buffer already open, activate it