diffview-plus.nvim icon indicating copy to clipboard operation
diffview-plus.nvim copied to clipboard

[Bug] winfixbuf option causes orphaned windows when switching layouts

Open jakubbortlik opened this issue 1 month ago • 0 comments

Description

The recently added winfixbuf option causes orphaned windows when switching layouts.

Expected behavior

No response

Actual behavior

The windows from the previous layout stay open.

Steps to reproduce

  1. nvim --clean -u mini.lua
  2. :DiffviewFileHistory in a repo
  3. g<c-x>

Health check

diffview: ✅

Checking icon provider ~

  • No icon provider found (nvim-web-devicons or mini.icons). Icons will be disabled; set use_icons = false to silence this.

Checking VCS tools ~

  • The plugin requires at least one of the supported VCS tools to be valid.
  • ✅ OK Jujutsu is up-to-date. (0.45.1)
  • ✅ OK Git is up-to-date. (2.56.0)
  • ✅ OK Mercurial is up-to-date. (7.2.4)

Log info

No response

Neovim version

NVIM v0.12.5
Build type: Release
LuaJIT 2.1.1774638290

Operating system and version

Linux 7.2.9-1-MANJARO x86_64 GNU/Linux

Minimal config

local root = vim.fn.stdpath("run") .. "/nvim/diffview-plus.nvim"
local plugin_dir = root .. "/plugins"
vim.fn.mkdir(plugin_dir, "p")

for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

local plugins = {
  { "diffview-plus.nvim", url = "https://github.com/dlyongemallo/diffview-plus.nvim.git" },
}

for _, spec in ipairs(plugins) do
  local install_path = plugin_dir .. "/" .. spec[1]
  if vim.fn.isdirectory(install_path) ~= 1 then
    if spec.url then
      print(string.format("Installing '%s'...", spec[1]))
      vim.fn.system({ "git", "clone", "--depth=1", spec.url, install_path })
    end
  end
  vim.opt.runtimepath:append(spec.path or install_path)
end

require("diffview").setup({
  view = { winfixbuf = true },
})

print("Ready!")

jakubbortlik avatar Oct 05 '26 15:10 jakubbortlik