mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
parent
4c55f1c2da
commit
743f8b3fee
1 changed files with 3 additions and 0 deletions
|
@ -1091,6 +1091,9 @@ function M:dim(parent)
|
|||
ret.width = math.max(ret.width, self.opts.min_width or 0, 1)
|
||||
ret.width = math.min(ret.width, self.opts.max_width or ret.width, parent.width)
|
||||
|
||||
if self.opts.relative == "cursor" then
|
||||
ret.row, ret.col = ret.row or 0, ret.col or 0
|
||||
end
|
||||
ret.row = pos(self.opts.row, ret.height, parent.height, border.top, border.bottom)
|
||||
ret.col = pos(self.opts.col, ret.width, parent.width, border.left, border.right)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue