mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-11 21:03:05 +08:00
+ fix: command line position args
This commit is contained in:
parent
61df030037
commit
692a5076bf
@ -2779,11 +2779,12 @@ void DialogNewWindow(HWND hwnd, bool bSaveOnRunTools, bool bSetCurFile)
|
||||
if (bSaveOnRunTools && !FileSave(false, true, false, false)) { return; }
|
||||
|
||||
GetModuleFileName(NULL, szModuleName, COUNTOF(szModuleName));
|
||||
NormalizePathEx(szModuleName, COUNTOF(szModuleName));
|
||||
|
||||
StringCchPrintf(tch, COUNTOF(tch), L"\"-appid=%s\"", g_wchAppUserModelID);
|
||||
StringCchCopy(szParameters, COUNTOF(szParameters), tch);
|
||||
|
||||
StringCchPrintf(tch, COUNTOF(tch), L" \"-sysmru=%i\"", (g_flagUseSystemMRU == 2) ? 1 : 0);
|
||||
StringCchPrintf(tch, COUNTOF(tch), L"\" -sysmru=%i\"", (g_flagUseSystemMRU == 2) ? 1 : 0);
|
||||
StringCchCat(szParameters, COUNTOF(szParameters), tch);
|
||||
|
||||
StringCchCat(szParameters, COUNTOF(szParameters), L" -f");
|
||||
|
||||
@ -7271,16 +7271,17 @@ void ParseCommandLine()
|
||||
|
||||
while (bContinue && ExtractFirstArgument(lp3, lp1, lp2, (int)len)) {
|
||||
// options
|
||||
if (!bIsFileArg && (StringCchCompareN(lp1, len, L"+", 1) == 0)) {
|
||||
g_flagMultiFileArg = 2;
|
||||
bIsFileArg = true;
|
||||
}
|
||||
if (lp1[1] == L'\0') {
|
||||
if (!bIsFileArg && (lp1[0] == L'+')) {
|
||||
g_flagMultiFileArg = 2;
|
||||
bIsFileArg = true;
|
||||
}
|
||||
|
||||
else if (!bIsFileArg && (StringCchCompareN(lp1, len, L"-", 1) == 0)) {
|
||||
g_flagMultiFileArg = 1;
|
||||
bIsFileArg = true;
|
||||
else if (!bIsFileArg && (lp1[0] == L'-')) {
|
||||
g_flagMultiFileArg = 1;
|
||||
bIsFileArg = true;
|
||||
}
|
||||
}
|
||||
|
||||
else if (!bIsFileArg && ((*lp1 == L'/') || (*lp1 == L'-'))) {
|
||||
|
||||
// LTrim
|
||||
|
||||
Loading…
Reference in New Issue
Block a user