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