Follow vim-fugitive's quickfix flows in diff and merge views

未关闭
#31 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@CoreyKaylor 已经在做这个了。

开始于 2026年11月6日。

  • #32 来自 @CoreyKaylor —— 未关闭

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
lua, vim
领域
devtools

调研方向

Start by reading the :DiffBanditMerge and diff view entry points, then trace how sessions handle buffer changes, quickfix navigation, and Git commands from fugitive buffers; the issue does not name specific files or tests. Done when the listed fugitive flows use the correct file and comparison in place, commands work from fugitive buffers, and moving on from an untouched merge preserves its buffer.

由索引模型根据 Issue 内容生成。

描述

enhancement help wanted

This came out of a question on #1: does the merge view work with fugitive's :Git mergetool? The flow asked about is to load the conflicts into the quickfix list, run :DiffBanditMerge on the current buffer, and move between files with :cnext and :cprev.

It doesn't work today, and other fugitive flows have similar problems.

Problems

Merge views don't follow the quickfix list. :cnext to another file puts that file in the result pane, conflict markers included, while the session keeps tracking the old file. Running :DiffBanditMerge again stacks another tab.

Closing a merge can overwrite the conflicted file with base text. This doesn't need fugitive. :DiffBanditMerge on a file that's already open writes base text into its buffer and never restores it. After closing without edits, the buffer stays modified with its conflict markers gone, so a later :wall replaces the file on disk. Git still reports UU.

Leaving a file can break quickfix entries. A view that loaded a file wipes its buffer on the way out, so the next jump to that file fails with E92: Buffer not found. ]f then :cnext triggers it, and so does the merge walk under nohidden.

Git commands fail from fugitive's buffers. From the status buffer or any fugitive:// buffer, they fail with fatal: cannot change to 'fugitive:///...'.

Diff views don't follow the quickfix list either. After :Git difftool, :cnext leaves the right pane on another file. A jump from the left pane ends the session.

Views ignore the comparison a list describes. After :Git difftool HEAD~1, the view still compares against HEAD, so an entry can land on the wrong change. :Gclog can't move a commit review between commits.

What's wanted

  • :cnext, :cprev and related commands move merge and diff views in place, from any pane.
  • :Git difftool [range] and :Gclog lists show the comparison or commit each entry describes.
  • Git commands work from fugitive's buffers, using the file or commit under the cursor in the status buffer.
  • An opt-in setting opens DiffBandit from :Git mergetool, :Git difftool and dd in the status buffer.
  • Closing or moving on from an untouched merge leaves the file's buffer as it was, and unsaved edits survive moving between files.
主要语言
Lua
星标
298
派生
4
平均合并
1 天 4 小时
30 天内合并 PR
11

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CoreyKaylor/diffbandit.nvim 的其他 Issue

查看 CoreyKaylor/diffbandit.nvim 的全部 Issue

相似的 Issue

更多 Lua Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。