Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nui popup keeps size of first invocation #143

Open
LukasPietzschmann opened this issue Feb 21, 2024 · 0 comments
Open

Nui popup keeps size of first invocation #143

LukasPietzschmann opened this issue Feb 21, 2024 · 0 comments
Labels
bug Something isn't working P1 May get worked on if I get free time. PRs welcome

Comments

@LukasPietzschmann
Copy link

  • Related to nui and vim.ui.select
  • OS: linux
  • Neovim version: 0.9.5

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?

@stevearc stevearc added bug Something isn't working P1 May get worked on if I get free time. PRs welcome labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 May get worked on if I get free time. PRs welcome
Projects
None yet
Development

No branches or pull requests

2 participants