fix(layout): allow root with relative=cursor. Closes #479

This commit is contained in:
Folke Lemaitre 2025-01-16 09:08:18 +01:00
parent 3fdb7f4461
commit f06f14c4ae
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 2 additions and 2 deletions

View file

@ -61,7 +61,7 @@ function M.new(opts)
backdrop = nil
end
self.box_wins[box.id] = Snacks.win(Snacks.win.resolve(box, {
relative = is_root and "editor" or "win",
relative = is_root and (box.relative or "editor") or "win",
focusable = false,
enter = false,
show = false,