wagoodman / dive

A tool for exploring each layer in a docker image
MIT License
46.42k stars 1.77k forks source link

Current (highlighted) line in Layer Contents pane disappears when toggling views #543

Open erhhung opened 3 months ago

erhhung commented 3 months ago

What happened:

When toggling views (e.g. ^U Unmodified) in the Current Layer Contents pane, if the current (highlighted) line was below the last visible line in the updated file tree, the line highlight would disappear, and the current line position would stay the same such that you would now need to press up-arrow n times to arrive at the last visible line.

What you expected to happen:

While it would be nice if the same node (path) in the file tree would remain highlighted when switching between modified and unmodified files views, at the very least, the current line position should never be below the last visible line of the current view.

It's common to be moving deep down into the full file system tree and then, when toggling back to see the few layer changes, to have to navigate around the top couple of lines in the pane.

Environment: