feat(git): give every new git window a fresh jumplist
This commit is contained in:
+5
-3
@@ -82,8 +82,8 @@ end
|
||||
|
||||
---Place a buffer in the current window or a new split per `split`.
|
||||
---`false` replaces the current buffer, dropping a `'` mark first so
|
||||
---`''` jumps back. A direction string opens a leftabove split. Nil
|
||||
---falls back to a `splitbelow`-aware horizontal split.
|
||||
---`''` jumps back. A direction string opens a split on that side. Nil
|
||||
---falls back to `'splitbelow'` for the direction.
|
||||
---@param buf integer
|
||||
---@param split (false|"above"|"below"|"left"|"right")?
|
||||
---@return integer win
|
||||
@@ -93,9 +93,11 @@ function M.place_buf(buf, split)
|
||||
vim.api.nvim_set_current_buf(buf)
|
||||
return vim.api.nvim_get_current_win()
|
||||
end
|
||||
return vim.api.nvim_open_win(buf, true, {
|
||||
local win = vim.api.nvim_open_win(buf, true, {
|
||||
split = split or (vim.o.splitbelow and "below" or "above"),
|
||||
})
|
||||
vim.cmd("clearjumps")
|
||||
return win
|
||||
end
|
||||
|
||||
---@class ow.Git.NewScratchOpts : ow.Git.ScratchOpts
|
||||
|
||||
Reference in New Issue
Block a user