sindrets / diffview.nvim

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

[Bug] regression since PR #356 -- revert only works once #373

Closed emmanueltouzery closed 1 year ago

emmanueltouzery commented 1 year ago

Description

Since PR #356 was merged, reverting modified files for git works only for the first file. After that the action is without effect.

Expected behavior

Enter the diffview for a project in which multiple files were modified. Press X to revert the changes in multiple individual files. X should cause the changes for each individual files to be reverted.

Actual behavior

X works only for the first file.

Steps to reproduce

  1. Enter the diffview for a project in which multiple files were modified (:DiffviewOpen)
  2. Press X to revert the changes in multiple individual files.
  3. Notice that X works only the first time

Health check

Output of :checkhealth diffview ``` ============================================================================== 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.40.1) - WARNING Configured `hg_cmd` is not executable: 'hg' ```

Log info

No response

Neovim version

NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3

Operating system and version

Linux 6.3.5-200.fc38.x86_64 x86_64 GNU/Linux

Minimal config

No response

sindrets commented 1 year ago

Don't know why github didn't auto close. Anyway, thanks for the report. Fixed via fdf9c15f4e66297b8e119d1ad8eb0a247dc04c7c.