stevearc / dressing.nvim

Neovim plugin to improve the default vim.ui interfaces
MIT License
1.82k stars 32 forks source link

Nui popup keeps size of first invocation #143

Open LukasPietzschmann opened 7 months ago

LukasPietzschmann commented 7 months ago

And my config looks like the following:

        input = {
            -- ...
        },
        select = {
            enabled = true,
            backend = { 'nui' },
            trim_prompt = true,
            nui = {
                position = {
                    row = 2,
                    col = 0,
                },
                size = false,
                relative = 'cursor',
                border = { style = 'rounded' },
                buf_options = {
                    swapfile = false,
                    filetype = 'DressingSelect',
                },
                win_options = { winblend = 0 },
                max_width = 80,
                max_height = 40,
                min_width = 1,
                min_height = 1,
            },
        },

I'm using the following command as an example:

:lua vim.ui.select({'a', 'b'}, {}, function(i) print(i) end)

When running the above command for the first time, I get what I would expect: Screenshot_20240221_233412 Now let's modify the command a bit.

:lua vim.ui.select({'a', 'bbbbbbbbbbbbbbbbbb', 'c'}, {}, function(i) print(i) end)

Now I get this: Screenshot_20240221_233528 The popup didn't adapt to the new content.

Any idea if that's a bug, or a misconception on my side?