Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Fix #471, enable opening a file by drag-dropping it onto Oni #472

Merged
merged 3 commits into from
Jun 3, 2017
Merged

Fix #471, enable opening a file by drag-dropping it onto Oni #472

merged 3 commits into from
Jun 3, 2017

Conversation

keforbes
Copy link
Collaborator

@keforbes keforbes commented Jun 2, 2017

I'll let @extr0py judge whether this is the correct file to stick the event listener in, but this code works for me. Fixes #471.

@keforbes
Copy link
Collaborator Author

keforbes commented Jun 3, 2017

Ok, assuming @extr0py agrees with the location of this code, I'm pretty happy with this functionality. If a single file is drag/dropped, it replaces the current editor; if multiple files are drag/dropped, the first file replaces the current editor and the remaining files are opened in new tabs.

@bryphe
Copy link
Member

bryphe commented Jun 3, 2017

Looks great to me! Thanks for the quick fix on this, @keforbes 👍 👍

In terms of location of the code, I think we might eventually have to shuffle it a bit once #362 is implemented, because in that case there may be multiple <EditorHost /> components, so we'd want to put the drag/drop handler on those individually. But until that is implemented this is great, and it will be easy to move eventually.

I tried it on Windows and it works well!

@bryphe bryphe merged commit 5fe6de0 into onivim:master Jun 3, 2017
@keforbes keforbes deleted the drag-open-file branch June 5, 2017 14:27
@mjedmonds
Copy link

Hi all, this functionality isn't working for me on macOS - any ideas why?

@CrossR
Copy link
Member

CrossR commented Mar 19, 2018

Hi @mjedmonds , it isn't working for me now on Windows... At a guess with the recent changes to the architecture to support multiple instances of neovim and what not (ie #1682), this has broke now there is multiple instances around.

If you create an issue we can track adding it back again, and possibly some tests to prevent this happening again, though I expect tests for this would be very awkward.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants