mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(win): use sbuffer instead of split for split windows
This commit is contained in:
parent
e6b253944a
commit
bbd6d42a97
1 changed files with 2 additions and 2 deletions
|
|
@ -733,9 +733,9 @@ function M:open_win()
|
||||||
end
|
end
|
||||||
local cmd = split_commands[relative][position]
|
local cmd = split_commands[relative][position]
|
||||||
local size = vertical and opts.width or opts.height
|
local size = vertical and opts.width or opts.height
|
||||||
|
local resize = ("%sresize %s"):format(vertical and "vertical " or "", size)
|
||||||
vim.api.nvim_win_call(parent, function()
|
vim.api.nvim_win_call(parent, function()
|
||||||
vim.cmd("silent noswapfile " .. cmd .. " " .. size .. "split")
|
vim.cmd("silent noswapfile " .. cmd .. " sbuffer " .. self.buf .. " | " .. resize)
|
||||||
vim.api.nvim_win_set_buf(0, self.buf)
|
|
||||||
self.win = vim.api.nvim_get_current_win()
|
self.win = vim.api.nvim_get_current_win()
|
||||||
end)
|
end)
|
||||||
if enter then
|
if enter then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue