-
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
Dragging a tab from Visual Studio Code onto Windows Terminal causes it to crash. #7804
Comments
Whoa, that's wild. That's totally unexpected. |
Looks like VSCode generates a malformed clipboard/drop object; we should be more resilient. The WinRT DataItems API is failing when we ask "give us the files you said were dropped on me" here (2852): terminal/src/cascadia/TerminalControl/TermControl.cpp Lines 2850 to 2853 in 4a11497
|
I can easily reproduce this. And it is easy to fix the crash by simply catching it. But I kinda want it to work and haven't figured out a way to do so. For reference, both Edge and Firefox handles the tab dropping from VSCode as a file URI (file://something). Surprisely A side note: Should we also support |
This PR improves the clipboard handling logic of "drag and drop" in TermControl, making it more useful and less likely to crash. * Added support for two more categories of content, `ApplicationLink` and `WebLink`. * Reordered the ifs, making `StorageItem` the last clause. With WT being a text-oriented application, I think we can safely assume that the content being pasted is likely to be text/links. * Catch possible exceptions during `e.DataView().GetStorageItemsAsync()`. Closes #7804
This PR improves the clipboard handling logic of "drag and drop" in TermControl, making it more useful and less likely to crash. * Added support for two more categories of content, `ApplicationLink` and `WebLink`. * Reordered the ifs, making `StorageItem` the last clause. With WT being a text-oriented application, I think we can safely assume that the content being pasted is likely to be text/links. * Catch possible exceptions during `e.DataView().GetStorageItemsAsync()`. Closes #7804 (cherry picked from commit 60f1b0b)
🎉This issue was addressed in #8461, which has now been successfully released as Handy links: |
🎉This issue was addressed in #8461, which has now been successfully released as Handy links: |
Environment
Steps to reproduce
(Note that this occured because I missed when using VS Code, not because I thought it would do something meaningful.)
Expected behavior
Nothing, or an error to be generated. I don't rightly know what VS Code sends out when you drag a tab, I'm just expecting Windows Terminal not to crash.
Actual behavior
Windows Terminal closes, taking all my tabs with it as punishment for my failure to accurately use a mouse.
The text was updated successfully, but these errors were encountered: