yatli / fvim

Cross platform Neovim front-end UI, built with F# + Avalonia
MIT License
1.34k stars 30 forks source link

cannot drag-n-drop to open file from some software #260

Open xarthurx opened 1 year ago

xarthurx commented 1 year ago

I use "Everything" to search files and open by drag-and-drop, which is a quite convenient process. But I cannot do it to open it in Fvim.

Similar issues described here: https://www.voidtools.com/forum/viewtopic.php?t=7122

Here are the observed behavior for different nvim GUI on Windows:

From Software To Software Success
Windows Explorer Fvim Y
Windows Explorer Neovide Y
Windows Explorer nvim-qt Y
Windows Explorer notepad Y
Everything Fvim N
Everything Neovide Y
Everything nvim-qt N
Everything notepad Y

It might be caused by: https://stackoverflow.com/questions/39612616/drag-and-drop-from-32-to-64-bit

But I'm wondering how neovide handle it so that the bug doesn't not occur -- and if Fvim can do the same.

WillEhrendreich commented 1 year ago

when you go into your registry, navigate to "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\", and you look for "FVvim.{whatever file type you're trying to open}.\shell\edit\command", what does it look like? this is the command that gets run in to actually do what you're asking, if I'm not mistaken.

I usually use Registry Finder, because it's so much nicer, but you can look with regedit.exe too.

if the data looks anything like it's messed up, then it might be the culprit.

for instance, when installing fvim, the values were something like "\C:\FVim\FVim.exe" "%1" or some other incorrect path. i changed it to "C:\FVim\FVim.exe" "%1" and it works like a charm. If I'm understanding things correctly, the first thing in quotes is the program to run, the second part in quotes is saying the first argument to whatever was passed in, give me that filename here, which should be what you drag and dropped, or even opened from an explorer window, or whatever.

xarthurx commented 1 year ago

when you go into your registry, navigate to "HKEY_LOCAL_MACHINE\SOFTWARE\Classes", and you look for "FVvim.{whatever file type you're trying to open}.\shell\edit\command", what does it look like? this is the command that gets run in to actually do what you're asking, if I'm not mistaken.

I usually use Registry Finder, because it's so much nicer, but you can look with regedit.exe too.

if the data looks anything like it's messed up, then it might be the culprit.

for instance, when installing fvim, the values were something like "\C:\FVim\FVim.exe" "%1" or some other incorrect path. i changed it to "C:\FVim\FVim.exe" "%1" and it works like a charm. If I'm understanding things correctly, the first thing in quotes is the program to run, the second part in quotes is saying the first argument to whatever was passed in, give me that filename here, which should be what you drag and dropped, or even opened from an explorer window, or whatever.

Unfortunately, I don't have a class named "FVvim.xxx"... I'm on Windows 11. As this is not a Fvim-only issue, I assume there's something wrong systematically.

bon-ami commented 2 months ago

I think we do not have FVim items under Classes b/c it is a portable app, but not installed. I can also drag-n-drop from Explorer, but not from Double Commander, when my mouse pointer changes to shortcut icon in FVim's area. but it does not work actually. I just made sure both Double Commander and FVim are 64bit.