notepad2-mod
notepad2-mod copied to clipboard
Drag-and-drop doesn't work x86 app to x64 notepad2-mod
I use Total Commander x86 edition with Windows 8.1 x64.
BTW, When I try to drag-n-drop file from TC(x86) to NP2(x64), it fails.
Is there anybody who meet same problem?
Well first try and see if the same arch works or not.
The OP appears to be correct. I tried the x86 and the x64 executables from the respective zip files (https://github.com/XhmikosR/notepad2-mod/releases/tag/4.2.25.870). I put them on my desktop and tried to drag'n'drop from a 32 bit application (XYplorer).
The x86 Notepad2 opened the file without an issue. The x64 application gave me a dialog with a warning icon that says "C:\Users
When I use Notepad2 as a replacement for Windows Notepad, I get the message except it wants to create a file in the system32 folder instead of my desktop.
I am using Windows 8.1 x64. I didn't have this issue on Windows 8, but then, I was on an older version of Notepad2, as well (a build from a few months ago, probably).
When drag-n-dropping on Windows, it returns "ShortPaths", so the paths are probably being read as ASCII and not UTF8, so it could be turned into gibberish, because of that.
Either way, without a patch nothing can be done.
I know, I know. It's just to give an idea of what the problem really is, and how to maybe fix it ;)
From MSDN: The simplest way to retrieve file names from a data object is the CF_HDROP format: Call IDataObject::GetData. Set the cfFormat member of the FORMATETC structure to CF_HDROP and the tymed member to TYMED_HGLOBAL. The dwAspect member is normally set to DVASPECT_CONTENT. However, if you need to have the file's path in short (8.3) format, set dwAspect to DVASPECT_SHORT. http://msdn.microsoft.com/en-us/library/windows/desktop/bb776904(v=vs.85).aspx#extracting_filenames
I have found it in the source code of Scintilla: https://github.com/XhmikosR/notepad2-mod/search?q=GetData&ref=cmdform
The problem is therefore in scintilla.
If that's the real reason, the issue should be reported upstream, to Scintilla. From a quick look I don't see something relevant in their development version.
Installing the 32-bit version allows drag'n'drop from either 32 or 64 bit sources. The installer auto-detects which one to install, so it always installs the 64-bit one but I want the 32 bit. Can the installer provide an option to select which one? Otherwise, it's kind of a pain to update.
Have you tried the "compatibility run" options? Is there any mode? I will take a look into the installer later.. Am 01.11.2014 16:53 schrieb drewkeller [email protected]:Installing the 32-bit version allows drag'n'drop from either 32 or 64 bit sources. The installer auto-detects which one to install, so it always installs the 64-bit one but I want the 32 bit. Can the installer provide an option to select which one? Otherwise, it's kind of a pain to update.
I don't really like that. It's time things move to 64-bit. You should ask for native 64-bit builds of the program you want to use. On Nov 1, 2014 5:53 PM, "drewkeller" [email protected] wrote:
Installing the 32-bit version allows drag'n'drop from either 32 or 64 bit sources. The installer auto-detects which one to install, so it always installs the 64-bit one but I want the 32 bit. Can the installer provide an option to select which one? Otherwise, it's kind of a pain to update.
— Reply to this email directly or view it on GitHub https://github.com/XhmikosR/notepad2-mod/issues/61#issuecomment-61372501 .
Compatibility mode is a good thought... what mode would you suggest? I'm on the Windows 10 preview and it only gives options going back to Vista.
The file browser I use is XYplorer. Which is awesome, except that the developer is not going to change to 64 bit due to the development tools he is using.
The simplest workaround is to not use the installer, but instead, extract notepad2-mod files from the x86 zip file into some folder, and then run the following batch file (came from http://www.flos-freeware.ch/doc/notepad2-Replacement.html). Be sure to run it as an adminstrator
:: To replace Windows notepad, run the command below
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%~dp0Notepad2.exe\" /z" /f
:: For jump list support...
reg add "HKCR\*\OpenWithList\Notepad2.exe" /f
reg add "HKCR\Applications\Notepad2.exe" /v "AppUserModelID" /t REG_SZ /d "Notepad2" /f
reg add "HKCR\Applications\Notepad2.exe\shell\open\command" /ve /t REG_SZ /d "\"%~dp0Notepad2.exe\" %%1" /f
pause
Well that is always available. I simply offer the installer because I prefer using it myself.
Any person who insists on using 32-bit tools in 2014 is... you know. 64-bit processors exist more than 11 years. Even the cell phone I'm typing this has a 64-bit processor...
Anyway, I might reconsider adding an option. Or if someone provides a patch I can review that will speed things up. On Nov 1, 2014 7:01 PM, "drewkeller" [email protected] wrote:
Compatibility mode is a good thought... what mode would you suggest? I'm on the Windows 10 preview and it only gives options going back to Vista.
The file browser I use is XYplorer. Which is awesome, except that the developer is not going to change to 64 bit due to the development tools he is using.
The simplest workaround is to not use the installer, but instead, extract notepad2-mod files from the x86 zip file into some folder, and then run the following batch file (came from http://www.flos-freeware.ch/doc/notepad2-Replacement.html).
:: To replace Windows notepad, run the command below reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d ""%~dp0Notepad2.exe" /z" /f
:: For jump list support... reg add "HKCR*\OpenWithList\Notepad2.exe" /f reg add "HKCR\Applications\Notepad2.exe" /v "AppUserModelID" /t REG_SZ /d "Notepad2" /f reg add "HKCR\Applications\Notepad2.exe\shell\open\command" /ve /t REG_SZ /d ""%~dp0Notepad2.exe" %%1" /f
— Reply to this email directly or view it on GitHub https://github.com/XhmikosR/notepad2-mod/issues/61#issuecomment-61374914 .
Ehm... guys... i cannot reproduce this issue... I have tried TotalCommander and XYplorer(trial). I was able to drag files from either applications directly on the notepad2.exe or an already existing open notepad2 window. Text could be only dragged on an already running notepad2 window. But that is not an issue, that is normal.
Do you have any more details how to recreate this issue? What is your installation path? What notepad2 version are you running?
Oh, as I am writing this lines it strikes me that I have a differend Windows version than you. I have Win7-x64. You and the OP have newer Windows versions. Either there is another behaviour on newer Windows, or this issue has perhaps been fixed upstream.
Drag'n'drop works for me at work with Win7-x64.
What I'm using at home now is Windows 10 preview (x64 of course) which is basically a fresh install (less than 48 hours). Drag'n'drop results in the weirdness described above.
It's just the normal drag the file from XYplorer onto an already open window of Notepad2-mod. I've tried dragging onto the title bar and the editing area.
I tried the newest available version of Notepad2-mod on all tests mentioned. Same version of XYplorer on both home and work.
Using the installer forces a particular installation path (either Program Files/Notepad2 or Program Files (x86)/Notepad2). There is no way to choose it unless you use the zip file. Which I also find kind of annoying but that's a separate issue. I like to put all my programs on a separate drive mapping.
Now I see that's an issue with higher Windows versions. I will search if there is a newer, special way to work with drag'n'drop. Am 03.11.2014 09:33 schrieb drewkeller [email protected]:Drag'n'drop works for me at work with Win7-x64.
What I'm using at home now is Windows 10 preview (x64 of course) which is basically a fresh install (less than 48 hours). Drag'n'drop results in the weirdness described above.
It's just the normal drag the file from XYplorer onto an already open window of Notepad2-mod. I've tried dragging onto the title bar and the editing area.
I tried the newest available version of Notepad2-mod on all tests mentioned. Same version of XYplorer on both home and work.
Using the installer forces a particular installation path (either Program Files/Notepad2 or Program Files (x86)/Notepad2). There is no way to choose it unless you use the zip file. Which I also find kind of annoying but that's a separate issue. I like to put all my programs on a separate drive mapping.
—Reply to this email directly or view it on GitHub. {"@context":"http://schema.org","@type":"EmailMessage","description":"View this Issue on GitHub","action":{"@type":"ViewAction","url":"https://github.com/XhmikosR/notepad2-mod/issues/61#issuecomment-61450297","name":"View Issue"}}
This can be fixed by patch (very simple) Scintilla to support SCN_URIDROPPED
on Win32 (currently only supported on GTK), see https://sourceforge.net/p/scintilla/feature-requests/1227/ and https://github.com/zufuliu/notepad2/commit/d6aa2f1d81f6afe8fe7af48dbf075a10559f875e.