zufuliu / notepad4

Notepad4 (Notepad2⨯2, Notepad2++) is a light-weight Scintilla based text editor for Windows with syntax highlighting, code folding, auto-completion and API list for many programming languages and documents, bundled with file browser plugin matepath.
Other
2.6k stars 184 forks source link

Drag & drop file into Notepad2 cause the file to be loaded twice #703

Closed zufuliu closed 1 year ago

zufuliu commented 1 year ago

Following code is intended to fix the bug when drag & drop file from 32 bit app to 64 bit Notepad2 (see https://stackoverflow.com/questions/39612616/drag-and-drop-from-32-to-64-bit/39664759#39664759): https://github.com/zufuliu/notepad2/blob/361dfdee4dbb24965e01c7811062f4aee14c7279/scintilla/win32/ScintillaWin.cxx#L3887-L3888

However this cause (tested on Win 10) main windows receives two WM_DROPFILES messages (with identical wParam and lParam). https://github.com/zufuliu/notepad2/blob/361dfdee4dbb24965e01c7811062f4aee14c7279/src/Notepad2.c#L1241-L1244

zufuliu commented 1 year ago

Fixed by 3fb3db695788bbb96fead32f7afe5e9974ecf3ab.