Fix saved file from new empty doc keeping created time tip issue

Fix https://community.notepad-plus-plus.org/topic/26235/notepad-v8-7-1-release-candidate/11?_=1730165549940
This commit is contained in:
Don Ho 2024-10-30 01:53:07 +01:00
parent ddf7908535
commit 93ecbb004c
2 changed files with 10 additions and 1 deletions

View File

@ -1651,7 +1651,10 @@ bool Notepad_plus::fileSave(BufferID id)
{
if (buf->isUntitled())
{
return fileSaveAs(bufferID);
bool isOK = fileSaveAs(bufferID);
if (isOK)
buf->clearTabCreatedTimeString();
return isOK;
}
const NppGUI & nppgui = (NppParameters::getInstance()).getNppGUI();

View File

@ -292,6 +292,12 @@ public:
_tabCreatedTimeString = getTimeString(now);
}
}
void clearTabCreatedTimeString() {
if (_currentStatus != DOC_UNNAMED)
{
_tabCreatedTimeString = L"";
}
}
size_t docLength() const {
assert(_pManager != nullptr);