Closed rstcruzo closed 11 months ago
The problem is that you're using Neogit's custom integration layer over diffview. When you open a diffview through their interface they take control over updating the file data and file list. This does not happen if you instantiate diffview through the normal :DiffviewOpen
command. Automatic updates were implemented a long time ago.
You are right. This indeed works as expected when using:DiffviewOpen
directly.
Description
Thanks for the plugin!
Before commiting some changes, I often stage hunk by hunk to review each change. I'm doing it with
do
anddp
commands and iterating over hunks with]c
and[c
. The problem is when I'm done staging all the hunks of a file, the file panel does not get updated, the file is still under theChanges
section instead of theStaged Changes
section. Calling DiffviewRefresh does not work either, I have to hit q and start diffview again for the changes to reflect in the file panel.Expected behavior
Ideal: The file panel is updated automatically as soon as I stage a hunk and after all the hunks are staged. Good enough: The file panel is updated after I manually call DiffviewRefresh.
Actual behavior
The file panel is not updated, not even after calling DiffviewRefresh.
Steps to reproduce
Health check
Output of
``` diffview: require("diffview.health").check() Checking plugin dependencies ~ - OK nvim-web-devicons installed. Checking VCS tools ~ - The plugin requires at least one of the supported VCS tools to be valid. - OK Git found. - OK Git is up-to-date. (2.39.2) - WARNING Configured `hg_cmd` is not executable: 'hg' ```:checkhealth diffview
Log info
Relevant info from
``` [INFO 2023-07-27 00:21:37.986 -0500] .../diffview.nvim/lua/diffview/api/views/diff/diff_view.lua:35: [api] Creating a new Custom DiffView. [INFO 2023-07-27 00:21:41.544 -0500] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:483: [CDiffView] Completed update for 1 files successfully (28.021 ms) [INFO 2023-07-27 00:21:42.092 -0500] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:483: [CDiffView] Completed update for 1 files successfully (41.249 ms) [INFO 2023-07-27 00:21:44.297 -0500] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:483: [CDiffView] Completed update for 1 files successfully (45.019 ms) [INFO 2023-07-27 00:21:44.477 -0500] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:483: [CDiffView] Completed update for 1 files successfully (44.189 ms) ```:DiffviewLog
Neovim version
Operating system and version
Darwin 22.5.0 arm64
Minimal config