diff --git a/PowerEditor/bin/updater/GUP.exe b/PowerEditor/bin/updater/GUP.exe index 71647c582..5ffdf905c 100644 Binary files a/PowerEditor/bin/updater/GUP.exe and b/PowerEditor/bin/updater/GUP.exe differ diff --git a/PowerEditor/src/WinControls/OpenSaveFileDialog/FileDialog.cpp b/PowerEditor/src/WinControls/OpenSaveFileDialog/FileDialog.cpp index 4b4a060ac..1afc5d54b 100644 --- a/PowerEditor/src/WinControls/OpenSaveFileDialog/FileDialog.cpp +++ b/PowerEditor/src/WinControls/OpenSaveFileDialog/FileDialog.cpp @@ -276,9 +276,14 @@ static BOOL CALLBACK fileDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM HWND fnControl = ::GetDlgItem(hwnd, FileDialog::_dialogFileBoxId); TCHAR fn[MAX_PATH]; ::GetWindowText(fnControl, fn, MAX_PATH); + + // Check condition to have the compability of default behaviour if (*fn == '\0') return oldProc(hwnd, message, wParam, lParam); + else if (::PathIsDirectory(fn)) + return oldProc(hwnd, message, wParam, lParam); + // Process if (currentExt != TEXT("")) { generic_string fnExt = changeExt(fn, currentExt, false); diff --git a/PowerEditor/src/WinControls/shortcut/shortcut.cpp b/PowerEditor/src/WinControls/shortcut/shortcut.cpp index 75250d7f7..78bb4d146 100644 --- a/PowerEditor/src/WinControls/shortcut/shortcut.cpp +++ b/PowerEditor/src/WinControls/shortcut/shortcut.cpp @@ -563,11 +563,19 @@ recordedMacroStep::recordedMacroStep(int iMessage, long wParam, long lParam, int case IDD_FINDINFILES_DIR_COMBO: case IDD_FINDINFILES_FILTERS_COMBO: { +#ifdef UNICODE char *ch = reinterpret_cast(lParameter); TCHAR tch[2]; ::MultiByteToWideChar(codepage, 0, ch, -1, tch, 2); sParameter = *tch; +#else + char ch = *reinterpret_cast(lParameter); + TCHAR tch = ch; + sParameter = tch; + // dummy call + codepage = 0; +#endif MacroType = mtUseSParameter; lParameter = 0; } @@ -588,12 +596,17 @@ void recordedMacroStep::PlayBack(Window* pNotepad, ScintillaEditView *pEditView) else { long lParam = lParameter; +#ifdef UNICODE char ansiBuffer[3]; - +#endif if (MacroType == mtUseSParameter) { +#ifdef UNICODE ::WideCharToMultiByte(pEditView->execute(SCI_GETCODEPAGE), 0, sParameter.c_str(), -1, ansiBuffer, 3, NULL, NULL); lParam = reinterpret_cast(ansiBuffer); +#else + lParam = reinterpret_cast(sParameter.c_str()); +#endif } pEditView->execute(message, wParameter, lParam);