GNOME Bugzilla – Bug 747255
Add Ability to Swap Views After Viewing Diff
Last modified: 2017-12-13 19:11:47 UTC
I'm wondering how possible it would be to add the ability to swap the files' location when viewing a diff. For example, say we do something like this: `meld file1 file2`, at which point `file1` will be on the left and `file2` on the right. Currently there isn't a way of swapping these panes around post-diff without re-running the command. I'm imagining a hotkey you can use that swaps the currently active pane with the one to the left / right. If there are only two files being compared, we could have either one just swap both panes. Somewhat related, though it seems to mainly concern itself with the order of the arguments. https://bugzilla.gnome.org/show_bug.cgi?id=379160
This seems reasonable, but it's also a fairly minor use case. I'd be happy to see someone do this (and it shouldn't be hard) but there would need to be some thought put in to how and where to expose it in the UI.
If you could come up with an acceptable UI setup, I'd be interested in taking a crack at it. Does my outline of how it would be exposed be good enough, or are you thinking something different?
Yeah, I think a shortcut key would be fine, given the nature of this. I do think it's a relatively rare use case, so an obscure shortcut (let's say Ctrl+\ or something) would be workable. I'd probably even just add the one for swap-with-right and see how we go. In the distant future, I have a branch for having per-pane status bars for file comparisons at least, in which case we could use the dead space below the middle bars in the status bar to put up some kind of swap button. Realistically, that's a long way away though. Let me know if I can give any guidance here. Note that you may need different logic for file and folder comparisons (though you also may not).
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/meld/issues/85.