diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 3fba70fd1..cfaec8d0c 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -6097,6 +6097,7 @@ std::vector Notepad_plus::loadCommandlineParams(const TCHAR * co return std::vector(); NppParameters& nppParams = NppParameters::getInstance(); + const NppGUI& nppGUI = nppParams.getNppGUI(); FileNameStringSplitter fnss(commandLine); // loading file as session file is allowed only when there is only one file @@ -6108,7 +6109,8 @@ std::vector Notepad_plus::loadCommandlineParams(const TCHAR * co const bool isSnapshotMode = false; const bool shouldLoadFileBrowser = true; - nppParams.setLoadedSessionFilePath(fnss.getFileName(0)); + if ((nppGUI._multiInstSetting == multiInstOnSession) || (nppGUI._multiInstSetting == multiInst)) + nppParams.setLoadedSessionFilePath(fnss.getFileName(0)); loadSession(session2Load, isSnapshotMode, shouldLoadFileBrowser); } return std::vector();