delta icon indicating copy to clipboard operation
delta copied to clipboard

🚀 Don't show blank left side in side-by-side view for added files

Open citizenharris opened this issue 3 years ago • 4 comments

At the moment in side-by-side view new files will show up on the right split. As there is nothing to compare it to the left split is completely blank. It would be great to have an option to show new files show up on the left split if there's nothing to compare.

citizenharris avatar Jan 18 '22 12:01 citizenharris

Hi @citizenharris, thanks! I agree. In fact I wonder if that should be the default. Are you thinking we should just not show that file in side-by-side mode at all? (I think I'm in favour of that.) I expect @th1000s has thought about this.

dandavison avatar Jan 18 '22 20:01 dandavison

The left side is also blank when a large block is added, in my opinion the "new" side should not jump around depending on whether the file was there already: the code is added, so it is on the right side.

th1000s avatar Jan 18 '22 22:01 th1000s

I believe that diffs adding multiple (large) new files are more common than PRs adding large blocks. If that's so, then I think there's an argument for new files being handled as a special case. So while I agree that I wouldn't want them in the left panel, I do wonder about disabling side-by-side entirely for new files.

(Tangential, but I sometimes wonder about displaying new files with no background coloring at all, just syntax highlighting, and something like a thick green line down the left side to make it clear what one is looking at.)

dandavison avatar Jan 18 '22 23:01 dandavison

Disabling side-by-side for new/deleted files would work well, in my opinion. I love using Delta, it's is a fantastic tool and I appreciate this is a minor nitpick 😅

citizenharris avatar Jan 19 '22 08:01 citizenharris