diff --git a/PowerEditor/src/Notepad_plus.h b/PowerEditor/src/Notepad_plus.h index 8f6cb05e5..9aef0676c 100644 --- a/PowerEditor/src/Notepad_plus.h +++ b/PowerEditor/src/Notepad_plus.h @@ -389,6 +389,8 @@ private: // then WM_ENDSESSION is send with wParam == FALSE // in this case this boolean is set true, so Notepad++ will quit and its current session will be saved + bool _isWorkspaceFileLoadedFromCommandLine = false; + ScintillaCtrls _scintillaCtrls4Plugins; std::vector > _hideLinesMarks; diff --git a/PowerEditor/src/Notepad_plus_Window.cpp b/PowerEditor/src/Notepad_plus_Window.cpp index 9d67e8b43..0e72bafb6 100644 --- a/PowerEditor/src/Notepad_plus_Window.cpp +++ b/PowerEditor/src/Notepad_plus_Window.cpp @@ -245,6 +245,10 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const TCHAR *cmdLin { _notepad_plus_plus_core.launchFileBrowser(fns, true); } + else if (_notepad_plus_plus_core._isWorkspaceFileLoadedFromCommandLine) + { + ::SendMessage(_hSelf, WM_COMMAND, IDM_VIEW_PROJECT_PANEL_1, 0); + } // Notify plugins that Notepad++ is ready SCNotification scnN; diff --git a/PowerEditor/src/NppIO.cpp b/PowerEditor/src/NppIO.cpp index 2063eebeb..f528aa992 100644 --- a/PowerEditor/src/NppIO.cpp +++ b/PowerEditor/src/NppIO.cpp @@ -211,7 +211,8 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive, if (isFileWorkspace(longFileName) && PathFileExists(longFileName)) { nppParam.setWorkSpaceFilePath(0, longFileName); - command(IDM_VIEW_PROJECT_PANEL_1); + _isWorkspaceFileLoadedFromCommandLine = true; +// command(IDM_VIEW_PROJECT_PANEL_1); return BUFFER_INVALID; }