refactor(git): scratch buffers wipe by default, consolidate factories in util

This commit is contained in:
2026-04-29 10:39:48 +02:00
parent 0766c7f11e
commit 18b198f293
6 changed files with 48 additions and 54 deletions
+2 -2
View File
@@ -495,7 +495,7 @@ end
---@return ow.Git.DiffSide
local function absent_pane(worktree, path, kind)
return {
buf = diff.empty_buf(),
buf = util.empty_buf(),
name = string.format(
"[absent %s] %s",
kind,
@@ -865,7 +865,7 @@ local function open(worktree)
end
local previous_win = vim.api.nvim_get_current_win()
local bufnr, win = util.new_scratch({ split = "left", bufhidden = "wipe" })
local bufnr, win = util.new_scratch({ split = "left" })
vim.bo[bufnr].filetype = "gitsidebar"
vim.wo[win].number = false