sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.85k stars 105 forks source link

From the file history panel, opening a commit and then calling :DiffviewClose changes the layout of the history panel #291

Closed schoblaska closed 1 year ago

schoblaska commented 1 year ago

https://user-images.githubusercontent.com/29129/214818189-2850dff5-adcd-4fae-b89c-18b7bbc6bf9e.mov

I noticed that if I'm in the file history panel, open a commit in diffview, and then close that new diffview tab with :DiffviewClose, the layout of the original file history tab changes such that the commit list is in a vertical split on the left instead of a horizontal split on the bottom. This doesn't seem to happen when I call :tabclose instead of :DiffviewClose.

Reproduced with the minimal config.

schoblaska commented 1 year ago

Thanks for looking at this so quickly!

FYI, I just got this error after calling :tabc in a file panel while a file history panel was also open. I haven't been able to reproduce it though.

image
sindrets commented 1 year ago

Seems like you only partially reloaded the plugin after updating, or you're using some sort of lua cache that wasn't invalidated correctly. is_buf_in_use() was added in the latest commit, so if the plugin was not properly reloaded it would be a nil value (thus the error).

Keep in mind that hot-reloading lua plugins is not really supported and has no guarantee of working as expected.

schoblaska commented 1 year ago

That makes sense. Thanks again! Diffview is such an important part of my workflow - I really appreciate all your work.