Browse Source

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 3 weeks ago
parent
commit
682570ea6d
  1. 3
      PowerEditor/src/NppIO.cpp
  2. 4
      PowerEditor/src/NppNotification.cpp

3
PowerEditor/src/NppIO.cpp

@ -1888,8 +1888,7 @@ bool Notepad_plus::fileSaveAs(BufferID id, bool isSaveCopy)
} }
fDlg.setTitle(localizedTitle.c_str()); fDlg.setTitle(localizedTitle.c_str());
const wstring checkboxLabel = _nativeLangSpeaker.getLocalizedStrFromID("file-save-assign-type", const wstring checkboxLabel = _nativeLangSpeaker.getLocalizedStrFromID("file-save-assign-type", L"&Append extension");
L"&Append extension");
fDlg.enableFileTypeCheckbox(checkboxLabel, !defaultAllTypes); fDlg.enableFileTypeCheckbox(checkboxLabel, !defaultAllTypes);
// Disable file autodetection before opening save dialog to prevent use-after-delete bug. // Disable file autodetection before opening save dialog to prevent use-after-delete bug.

4
PowerEditor/src/NppNotification.cpp

@ -1005,6 +1005,9 @@ BOOL Notepad_plus::notify(SCNotification *notification)
tipTmp = buf->getFullPathName(); tipTmp = buf->getFullPathName();
if (buf->isUntitled())
{
wstring tabCreatedTime = buf->tabCreatedTimeString(); wstring tabCreatedTime = buf->tabCreatedTimeString();
if (!tabCreatedTime.empty()) if (!tabCreatedTime.empty())
{ {
@ -1012,6 +1015,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
tipTmp += tabCreatedTime; tipTmp += tabCreatedTime;
SendMessage(lpttt->hdr.hwndFrom, TTM_SETMAXTIPWIDTH, 0, 200); SendMessage(lpttt->hdr.hwndFrom, TTM_SETMAXTIPWIDTH, 0, 200);
} }
}
else else
{ {
SendMessage(lpttt->hdr.hwndFrom, TTM_SETMAXTIPWIDTH, 0, -1); SendMessage(lpttt->hdr.hwndFrom, TTM_SETMAXTIPWIDTH, 0, -1);

Loading…
Cancel
Save