Skip to content

Commit

Permalink
Fix saved file from new empty doc keeping created time tip issue
Browse files Browse the repository at this point in the history
  • Loading branch information
donho committed Oct 30, 2024
1 parent ddf7908 commit 93ecbb0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PowerEditor/src/NppIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 6 additions & 0 deletions PowerEditor/src/ScintillaComponent/Buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,12 @@ class Buffer final {
_tabCreatedTimeString = getTimeString(now);
}
}
void clearTabCreatedTimeString() {
if (_currentStatus != DOC_UNNAMED)
{
_tabCreatedTimeString = L"";
}
}

size_t docLength() const {
assert(_pManager != nullptr);
Expand Down

0 comments on commit 93ecbb0

Please sign in to comment.