Skip to content

Help focusing on filtered file when viewing commit files #4935

@mikavilpas

Description

@mikavilpas

Is your feature request related to a problem? Please describe.

I like to view the history for a file with
lazygit --filter <filepath> --screen-mode normal. This works great when
looking at getting an overview of the commits touching the file.

However, when I need to see the details for a specific commit with <enter>,
lazygit shows more files than just the one I filtered for, and it is a bit
jarring as I have to locate the file I'm interested in.

output.mp4

Describe the solution you'd like

When showing the full commit, could lazygit focus on the file I filtered for?

This way no details would be lost, but I don't have to hunt for the file I'm
interested in.

Describe alternatives you've considered

Could also highlight the file I'm interested in with a color, but it might still
make sense to focus on it automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions