-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag and drop from File Explorer should put full path at cursor location in Windows Terminal #904
Comments
Ref. #331 for linking purposes. |
I'm just wondering if there's any update on when this will be enabled. I saw that there are issues with capturing path information under WSL, but will this be implemented for cmd.exe and/or PowerShell anytime soon? Thanks! |
@RobertBernstein At the time of writing, this particular feature hasn't had any progress. It's still sitting on our backlog - it's something that we want to do, but we unfortunately don't think we'll be able to get to before the 1.0 release of the Terminal. We'd be happy to accept a community contribution for this feature! There's code in |
## Summary of the Pull Request I took the code from conhost that handles this and just copy-pasted it into the terminal codebase. ## References Original conhost code: https://github.com/microsoft/terminal/blob/027f1228cb92746de102f04c491ac02b98708bf2/src/interactivity/win32/windowproc.cpp#L854-L889 ## PR Checklist * [x] Closes #904 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments Okay it was a little more complicated than that. I had `IslandWindow` handle the drop, which then raises a generic event for `AppHost` to handle. `AppHost` handles this by writing the path as input to the terminal, traversing `AppLogic`, `TerminalPage` and finally landing in `TermControl` ## Validation Steps Performed Tested manually with both paths with and without spaces.
Hi, I've downloaded today's CI build to try this new feature. It sometimes works but randomly stops working. Strangely, the success rate has a noticeable increase if Also, some area is not available for dropping, which I suspect to be related with the DPI scaling (I use 150%). Thank you! |
🎉This issue was addressed in #4323, which has now been successfully released as Handy links: |
@jingyu9575 Maybe opening a new issue? |
Summary of the new feature/enhancement
Drag and drop of file or folder from File Explorer should behave the same way that it does in conhost. Conhost will add the text of the full path of the item dropped at the current cursor location.
Proposed technical implementation details (optional)
The text was updated successfully, but these errors were encountered: