refactor(git): scratch buffers wipe by default, consolidate factories in util
This commit is contained in:
+3
-1
@@ -41,7 +41,9 @@ function M.show(opts)
|
||||
return
|
||||
end
|
||||
|
||||
local buf = util.new_scratch()
|
||||
-- `hide` keeps the log around when the user navigates into a commit
|
||||
-- via `<CR>` (which replaces the current buffer); `<C-^>` jumps back.
|
||||
local buf = util.new_scratch({ bufhidden = "hide" })
|
||||
vim.b[buf].git_worktree = worktree
|
||||
vim.bo[buf].modifiable = true
|
||||
vim.api.nvim_buf_set_lines(buf, 0, -1, false, util.split_lines(stdout))
|
||||
|
||||
Reference in New Issue
Block a user