-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Allow files in diff views to be dragged outside of the app #533
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
Conversation
e6b1791
to
e3598a8
Compare
Updated. |
fce144a
to
67058b6
Compare
This all seems like an improvement to me. The only thing I notice is that dragging to Terminal from either the working directory, the index, or history all seems to result in a relative path from the directory level, never an absolute path as your chart says. Looks great other than that. |
67058b6
to
b798774
Compare
Good call-out. That might be fine (since it's not a regression), the primary intent here is definitely other apps, but I'll double-check it. |
b798774
to
ee6d290
Compare
OK! This was my typo in the table. Terminal does no special adjudication for the pasteboard; it always requests strings — thus choosing the relative path — unless Opt is held during the drag. This is fine for now. I think we could get away with sending just the file URL all the time, but in the spirit of not having any regressions I'm leaving the PR as it is. I've updated the table in the PR description accordingly. |
ee6d290
to
a04a4e0
Compare
* Remove extra indirection in file lists * Use native table view drag handling in diff views * Use the common dragging implementation for copying in a diff files view * Provide the plain-text relative path for diff view drag and drop * Allow dragging files out of the working copy into external apps * Allow dragging files out of diffs into external apps
Modernizes the table drag/drop in diff file views so it can pass file names, URLs, and promises to drags that finish outside the app.
I often find myself in the situation, particularly when resolving conflicts, that I want to open a file in an editor that would not be opened by clicking “Open with Default Editor”. This supports that use case and many more.