-
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
Fix drag and drop on '+' button for drive letters #10842
Conversation
@@ -255,10 +255,10 @@ namespace winrt::TerminalApp::implementation | |||
|
|||
std::wstring pathText = path.wstring(); | |||
|
|||
// Handle edge case of "C:\\", seems like the "StartingDirectory" doesn't like path which ends with '\' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually quite surprised by this premise. The reason we have issues with StartingDirectory when passed through the commandline are ones of escaping.
Does it really beef it if we don't do this trick at all? huh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(because the commandline escaping for wt
results in "C:\"
being parsed as C:\"
(terminating quote captured in path))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drag and dropping C:\
to get a new tab or split the current window works fine, it's just the new window case that fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH. Okay.
We should fix this in the New Window commandline generator, honestly. That would also fix it for shift-clicking the cmd2
profile I created to test this. 😄
I suspect that this code lives in NewTerminalArgs::ToCommandline
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done - with the added bonus that this now has a test 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love that you added a test, thanks!
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
Fixes dragging and dropping drive letters onto the '+' button.
Manually tested - dragging and dropping the
C:\
drive onto the '+' button works when creating a new tab, splitting or creating a new window. Dragging and dropping a regular directory still works.Closes #10723