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 2aa47e3 commit 682570e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 1 addition & 2 deletions PowerEditor/src/NppIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1888,8 +1888,7 @@ bool Notepad_plus::fileSaveAs(BufferID id, bool isSaveCopy)
}
fDlg.setTitle(localizedTitle.c_str());

const wstring checkboxLabel = _nativeLangSpeaker.getLocalizedStrFromID("file-save-assign-type",
L"&Append extension");
const wstring checkboxLabel = _nativeLangSpeaker.getLocalizedStrFromID("file-save-assign-type", L"&Append extension");
fDlg.enableFileTypeCheckbox(checkboxLabel, !defaultAllTypes);

// Disable file autodetection before opening save dialog to prevent use-after-delete bug.
Expand Down
14 changes: 9 additions & 5 deletions PowerEditor/src/NppNotification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1005,12 +1005,16 @@ BOOL Notepad_plus::notify(SCNotification *notification)

tipTmp = buf->getFullPathName();

wstring tabCreatedTime = buf->tabCreatedTimeString();
if (!tabCreatedTime.empty())

if (buf->isUntitled())
{
tipTmp += L"\r";
tipTmp += tabCreatedTime;
SendMessage(lpttt->hdr.hwndFrom, TTM_SETMAXTIPWIDTH, 0, 200);
wstring tabCreatedTime = buf->tabCreatedTimeString();
if (!tabCreatedTime.empty())
{
tipTmp += L"\r";
tipTmp += tabCreatedTime;
SendMessage(lpttt->hdr.hwndFrom, TTM_SETMAXTIPWIDTH, 0, 200);
}
}
else
{
Expand Down

0 comments on commit 682570e

Please sign in to comment.