From a187741494740d7cc4680f6c8cfc6c459f06c404 Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Wed, 15 Mar 2023 09:48:42 +0100 Subject: [PATCH] +fix: in case of no file args: open empty doc instead of file open dialog --- src/Notepad3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Notepad3.c b/src/Notepad3.c index c563fe851..4f7e539c8 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -1823,13 +1823,13 @@ HWND InitInstance(const HINSTANCE hInstance, int nCmdShow) // Pathname parameter - Path_CanonicalizeEx(hfile_pth, Paths.WorkingDirectory); - if (s_IsThisAnElevatedRelaunch || (Path_IsNotEmpty(hfile_pth) /*&& !g_flagNewFromClipboard*/)) { - + if (s_IsThisAnElevatedRelaunch || (Path_IsNotEmpty(s_pthArgFilePath) /*&& !g_flagNewFromClipboard*/)) + { fLoadFlags |= Settings.SkipUnicodeDetection ? FLF_SkipUnicodeDetect : 0; fLoadFlags |= Settings.SkipANSICodePageDetection ? FLF_SkipANSICPDetection : 0; // Open from Directory + Path_CanonicalizeEx(hfile_pth, Paths.WorkingDirectory); if (!s_IsThisAnElevatedRelaunch && Path_IsExistingDirectory(hfile_pth)) { if (OpenFileDlg(Globals.hwndMain, hfile_pth, hfile_pth)) {