Skip to content

Commit

Permalink
fix: deepcopy size and potions before calculating layout
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 4, 2022
1 parent 96e8dd0 commit b80f14a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/noice/util/nui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ end

---@param dim {width: number, height:number}
---@param opts NoiceViewOptions
---@return NoiceNuiOptions
function M.get_layout(dim, opts)
local position = opts.position
local size = opts.size
local position = vim.deepcopy(opts.position)
local size = vim.deepcopy(opts.size)

---@return number
local function minmax(min, max, value)
Expand Down

0 comments on commit b80f14a

Please sign in to comment.