mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-26 07:15:21 +02:00
Fix loaded session being empty on exit
In the following configuration loaded session will be empty on exit * Remember current session for next launch: OFF * Open session in a new instance: ON This commit fix the issue. Fix #10986, close #11017
This commit is contained in:
parent
e40aec0b3f
commit
ed40f11515
@ -1964,9 +1964,10 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
}
|
||||
|
||||
Session currentSession;
|
||||
getCurrentOpenedFiles(currentSession, true);
|
||||
|
||||
if (nppgui._rememberLastSession)
|
||||
{
|
||||
getCurrentOpenedFiles(currentSession, true);
|
||||
//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
|
||||
_lastRecentFileList.setLock(true); //only lock when the session is remembered
|
||||
@ -2032,7 +2033,6 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
//
|
||||
// saving session.xml into loaded session if a saved session is loaded and saveLoadedSessionOnExit option is enabled
|
||||
//
|
||||
|
||||
generic_string loadedSessionFilePath = nppParam.getLoadedSessionFilePath();
|
||||
if (!loadedSessionFilePath.empty() && PathFileExists(loadedSessionFilePath.c_str()))
|
||||
nppParam.writeSession(currentSession, loadedSessionFilePath.c_str());
|
||||
|
Loading…
x
Reference in New Issue
Block a user