mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(terminal): dont overwrite user opts
This commit is contained in:
parent
f5602e60c3
commit
0b08d280b6
1 changed files with 2 additions and 6 deletions
|
|
@ -62,13 +62,9 @@ local terminals = {}
|
|||
---@param opts? snacks.terminal.Opts
|
||||
function M.open(cmd, opts)
|
||||
local id = vim.v.count1
|
||||
opts = Snacks.config.get(
|
||||
"terminal",
|
||||
defaults --[[@as snacks.terminal.Opts]],
|
||||
{ win = { position = cmd and "float" or "bottom" } },
|
||||
opts
|
||||
)
|
||||
opts = Snacks.config.get("terminal", defaults --[[@as snacks.terminal.Opts]], opts)
|
||||
opts.win = Snacks.win.resolve("terminal", opts.win)
|
||||
opts.win.position = opts.win.position or (cmd and "float" or "bottom")
|
||||
opts.win.wo.winbar = opts.win.wo.winbar or (opts.win.position == "float" and "" or (id .. ": %{b:term_title}"))
|
||||
|
||||
if opts.override then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue