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

Filter after open `:DiffviewFileHistory` #292

Closed LintaoAmons closed 1 year ago

LintaoAmons commented 1 year ago

Often the case, I want to filter the commit after I :DiffviewFileHistory,

So base on what I saw, I want to find the think I'm looking for.

I know that I can use :DiffviewFileHistory --grep=xxx to filter commits, So wonder if it's possible to trigger a filter input popup, when I was in commits buffer, and then filter base on the input.

sindrets commented 1 year ago

Yes, that's what the option panel is for. You can open it from the file history panel by pressing g! by default. See :h :DiffviewFileHistory for more info.

LintaoAmons commented 1 year ago

Oh, that's exactly what I want!

One thing to mention is you must quit the option panel to make the filter take effect, If it's possible to make it take effect immediately after a filter was typed in, without leaving the option panel, make it more like interactive.

sindrets commented 1 year ago

Updating the file history can take up to several seconds. Having the history update every time you change a flag in the option panel sounds frustrating. I prefer the way it works currently.