Skip to content

Single file diff panel duplicates name a few times #100

@agilgur5

Description

@agilgur5

When using the single file view, the name of the file gets duplicated a few times in the diff panel. With separators and new lines added, this ends up unnecessarily taking up half of my vertical space as I generally use VSCode's integrated terminal.
In my case, that makes it difficult to use compared to plain old git diff, even though I very much like the file-tree that diffnav provides

Screenshots

Diffnav -- I navigated to .gitignore, so I know that's the file I'm in (and it's highlighted etc), but then it also says .gitignore twice in the diff panel. As I'm in a single file view, this is duplicative information and an unnecessary use of significant space as such:

Image

regular git diff pager -- I actually see several lines more of the diff.

Image

and if I do git diff -- .gitignore, everything gets comfortably printed in my terminal with space to spare:

Image

Diffnav's diff panel shows the least information in the available vertical space in comparison

Implementation Details

I'm not sure if this is the preamble or the headerView or something else.

If I knew which one and you're okay with it, happy to write up a PR to either disable this in single-file view or to make it configurable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions