sindrets / diffview.nvim

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

no matching buffer for #346

Closed rgruyters closed 1 year ago

rgruyters commented 1 year ago

I have a weird issue when trying to use diffview.nvim. With a merge conflict with nvim and open DiffviewFiles (DiffviewOpen), I try to do a diffget //3 or a diffget //1, but it keeps saying "no matching buffer for //3". (or //1, depending which I want to select)

Is this a known issue?

I use Neovim 0.8.3, but also tested with Neovim 0.9.0. Both the same issues.

If you want to view my config, see my nvim repo

sindrets commented 1 year ago

Use the {stage}do mappings instead. Like:

There are also mappings for operating directly on the conflict markers. Please read :h diffview-merge-tool.


The [bufspec] in :diffget [bufspec] matches against buffer names. //3 and //1 don't match any of the buffers in diffview. This form of the command won't work regardless, because [bufspec] only matches against listed buffers, and all non-zero stage buffers are unlisted in diffview.

:diffget {bufnr} still works. But the mappings are far more convenient.

rgruyters commented 1 year ago

Thanks for the explanation! Works fine with 3do.