MunifTanjim / nui.nvim

UI Component Library for Neovim.
MIT License
1.62k stars 57 forks source link

UI glitch (Layout.Box) #343

Closed mobily closed 7 months ago

mobily commented 7 months ago

Hello! 👋 Thanks for this awesome library!

I have the following layout structure:

local Layout = require("nui.layout")
local Popup = require("nui.popup")

local p1 = Popup({border = "double"})
local p2 = Popup({border = "double"})
local p3 = Popup({border = "double"})
local p4 = Popup({border = "double"})

local layout =
  Layout(
  {
    position = "50%",
    size = {
      width = 80,
      height = 40
    }
  },
  Layout.Box(
    {
      Layout.Box(p1, {size = "50%"}),
      Layout.Box(
        {
          Layout.Box(p2, {size = "50%"}),
          Layout.Box(
            {
              Layout.Box(p3, {size = "50%"}),
              Layout.Box(p4, {size = "50%"})
            },
            {dir = "col", size = "50%"}
          )
        },
        {dir = "row", size = "50%"}
      )
    },
    {dir = "col"}
  )
)

layout:mount()

Here's the result:

CleanShot 2024-03-01 at 16 23 06@2x

I think two rectangles (at the top right) should be displayed at the bottom right. Am I doing something wrong or it's a bug?

MunifTanjim commented 7 months ago

Hey @mobily, thanks for reporting this.

Should be fixed with

mobily commented 7 months ago

hello @MunifTanjim 👋 it works right now, thanks for fixing this quickly!