nickjvandyke/opencode.nvim

bug: `<file>.new` buffer persists after edit request diff

クローズ

#258 opened on 2026/05/09

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Lua (127 件のフォーク)auto 404
buggood first issue

Repository metrics

Stars
 (3,504 個のスター)
PR merge metrics
 (平均マージ 2d 22h) (30d で 9 merged PRs)

説明

Describe the bug

When we display a diffpatch in response to an edit request, Neovim creates a <file>.new buffer. Even after the diff is closed, the .new buffer appears in e.g. buffer and file pickers, which is confusing and noisy.

Steps To Reproduce

  1. vim.g.opencode_opts.events.permissions.edits.enabled = true
  2. ask opencode to edit a file
  3. Respond to the edit request via the diff tab (haven't checked whether this only happens with certain responses)

Expected Behavior

<file>.new should be deleted from the buffer list.

See plugin/events/permissions/edits.lua

コントリビューターガイド