mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-12 16:34:44 +02:00
[NEW_FEATURE] Automatic Backup System (in progress).
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1214 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
db0489c8ed
commit
c79f105597
@ -4270,10 +4270,14 @@ void Notepad_plus::getCurrentOpenedFiles(Session & session, bool includUntitledD
|
|||||||
|
|
||||||
Buffer * buf = MainFileManager->getBufferByID(bufID);
|
Buffer * buf = MainFileManager->getBufferByID(bufID);
|
||||||
|
|
||||||
|
if (buf->isUntitled() && buf->docLength() == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!includUntitledDoc)
|
if (!includUntitledDoc)
|
||||||
if (!PathFileExists(buf->getFullPathName()))
|
if (!PathFileExists(buf->getFullPathName()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
||||||
generic_string languageName = getLangFromMenu(buf);
|
generic_string languageName = getLangFromMenu(buf);
|
||||||
const TCHAR *langName = languageName.c_str();
|
const TCHAR *langName = languageName.c_str();
|
||||||
sessionFileInfo sfi(buf->getFullPathName(), langName, buf->getEncoding(), buf->getPosition(editView), buf->getBackupFileName().c_str(), int(buf->getLastModifiedTimestamp()));
|
sessionFileInfo sfi(buf->getFullPathName(), langName, buf->getEncoding(), buf->getPosition(editView), buf->getBackupFileName().c_str(), int(buf->getLastModifiedTimestamp()));
|
||||||
|
@ -1402,7 +1402,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|||||||
Session currentSession;
|
Session currentSession;
|
||||||
if (nppgui._rememberLastSession)
|
if (nppgui._rememberLastSession)
|
||||||
{
|
{
|
||||||
getCurrentOpenedFiles(currentSession);
|
getCurrentOpenedFiles(currentSession, true);
|
||||||
//Lock the recent file list so it isnt populated with opened files
|
//Lock the recent file list so it isnt populated with opened files
|
||||||
//Causing them to show on restart even though they are loaded by session
|
//Causing them to show on restart even though they are loaded by session
|
||||||
_lastRecentFileList.setLock(true); //only lock when the session is remembered
|
_lastRecentFileList.setLock(true); //only lock when the session is remembered
|
||||||
|
Loading…
x
Reference in New Issue
Block a user