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
pull/15753/head
Don Ho 4 weeks ago
parent ddf7908535
commit 93ecbb004c

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

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

Loading…
Cancel
Save