Skip to content

Commit

Permalink
fix(terminal): user options
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 7, 2024
1 parent 0b08d28 commit 334895c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/snacks/terminal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ local terminals = {}
function M.open(cmd, opts)
local id = vim.v.count1
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 = Snacks.win.resolve("terminal", {
position = cmd and "float" or "bottom",
}, opts.win)
opts.win.wo.winbar = opts.win.wo.winbar or (opts.win.position == "float" and "" or (id .. ": %{b:term_title}"))

if opts.override then
Expand Down

0 comments on commit 334895c

Please sign in to comment.