This commit is contained in:
2025-11-19 13:35:24 -03:00
parent e5a08226b7
commit 4a0aaac043

View File

@@ -7,12 +7,13 @@ function M.float_terminal(cmd, opts)
local height = math.floor(vim.o.lines * (opts.height_ratio or 0.5))
local row = math.floor((vim.o.lines - height) / 2)
local col = math.floor((vim.o.columns - width) / 2)
-- FIX: 'buf' should be the first argument, not inside the options table.
vim.api.nvim_open_win(buf, true, {
style = "minimal", relative = "editor",
width = width, height = height, row = row, col = col,
border = opts.border or "rounded",
-- Set the buffer for the new window
buf = buf,
-- The key 'buf' was removed from here.
})
-- --- START MODIFICATION ---