mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-24 22:34:54 +02:00
Fix wrong project panel at start by openning a project via command line
Fix #8126, close #8161
This commit is contained in:
parent
3a9a31afb4
commit
cf2175e479
@ -389,6 +389,8 @@ private:
|
|||||||
// then WM_ENDSESSION is send with wParam == FALSE
|
// 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
|
// in this case this boolean is set true, so Notepad++ will quit and its current session will be saved
|
||||||
|
|
||||||
|
bool _isWorkspaceFileLoadedFromCommandLine = false;
|
||||||
|
|
||||||
ScintillaCtrls _scintillaCtrls4Plugins;
|
ScintillaCtrls _scintillaCtrls4Plugins;
|
||||||
|
|
||||||
std::vector<std::pair<int, int> > _hideLinesMarks;
|
std::vector<std::pair<int, int> > _hideLinesMarks;
|
||||||
|
@ -245,6 +245,10 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const TCHAR *cmdLin
|
|||||||
{
|
{
|
||||||
_notepad_plus_plus_core.launchFileBrowser(fns, true);
|
_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
|
// Notify plugins that Notepad++ is ready
|
||||||
SCNotification scnN;
|
SCNotification scnN;
|
||||||
|
@ -211,7 +211,8 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive,
|
|||||||
if (isFileWorkspace(longFileName) && PathFileExists(longFileName))
|
if (isFileWorkspace(longFileName) && PathFileExists(longFileName))
|
||||||
{
|
{
|
||||||
nppParam.setWorkSpaceFilePath(0, longFileName);
|
nppParam.setWorkSpaceFilePath(0, longFileName);
|
||||||
command(IDM_VIEW_PROJECT_PANEL_1);
|
_isWorkspaceFileLoadedFromCommandLine = true;
|
||||||
|
// command(IDM_VIEW_PROJECT_PANEL_1);
|
||||||
return BUFFER_INVALID;
|
return BUFFER_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user