A little improvement to allow automatic session restore based on the working dir (for those commandline-die-hards).
Besides the source change below you need to save a session file ONCE with the name "session.xml" to the directory that is your project directory. After that, every time you start N++ via command prompt from this directory or from a shortcut setting this as a working directory, N++ will use this session file instead of the global one. If the current directory does not contain a session.xml N++ behaves as before.
In Parameters.cpp (v4.2.2):
bool NppParameters::load(/*bool noUserPath*/)
{
...
//----------------------------//
// session.xml : for per user //
//----------------------------//
#define SESSION_PER_DIR // this line should go to BOF
#ifdef SESSION_PER_DIR
GetCurrentDirectory(sizeof _sessionPath,_sessionPath);
PathAppend(_sessionPath, "session.xml");
if (! PathFileExists(_sessionPath)) {
strcpy(_sessionPath, userPath);
PathAppend(_sessionPath, "session.xml");
}
#else
// original code
strcpy(_sessionPath, userPath);
PathAppend(_sessionPath, "session.xml");
#endif
_pXmlSessionDoc = new TiXmlDocument(_sessionPath);
loadOkay = _pXmlSessionDoc->LoadFile();
...
}
Please le me know whether you find this change useful OR if you find any issues with it.
Schwabix, markus@kuhn-clan.de
Wow, could it be you are slightly lagging?