|
|
|
@ -167,6 +167,11 @@ void expandNppEnvironmentStrs(const TCHAR *strSrc, TCHAR *stringDest, size_t str
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
HINSTANCE Command::run(HWND hWnd)
|
|
|
|
|
{
|
|
|
|
|
return run(hWnd, TEXT("."));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
HINSTANCE Command::run(HWND hWnd, const TCHAR* cwd)
|
|
|
|
|
{
|
|
|
|
|
const int argsIntermediateLen = MAX_PATH*2;
|
|
|
|
|
const int args2ExecLen = CURRENTWORD_MAXLENGTH+MAX_PATH*2;
|
|
|
|
@ -194,7 +199,10 @@ HINSTANCE Command::run(HWND hWnd)
|
|
|
|
|
expandNppEnvironmentStrs(cmdIntermediate, cmd2Exec, MAX_PATH, hWnd);
|
|
|
|
|
expandNppEnvironmentStrs(argsIntermediate, args2Exec, args2ExecLen, hWnd);
|
|
|
|
|
|
|
|
|
|
HINSTANCE res = ::ShellExecute(hWnd, TEXT("open"), cmd2Exec, args2Exec, TEXT("."), SW_SHOW);
|
|
|
|
|
TCHAR cwd2Exec[MAX_PATH];
|
|
|
|
|
expandNppEnvironmentStrs(cwd, cwd2Exec, MAX_PATH, hWnd);
|
|
|
|
|
|
|
|
|
|
HINSTANCE res = ::ShellExecute(hWnd, TEXT("open"), cmd2Exec, args2Exec, cwd2Exec, SW_SHOW);
|
|
|
|
|
|
|
|
|
|
// As per MSDN (https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx)
|
|
|
|
|
// If the function succeeds, it returns a value greater than 32.
|
|
|
|
|