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

bug: Two pinned entries with identical titles collide when both are un-initialized #119

Open
4 tasks done
a-usr opened this issue Nov 6, 2024 · 2 comments
Open
4 tasks done
Labels
bug Something isn't working

Comments

@a-usr
Copy link

a-usr commented Nov 6, 2024

Did you check docs and existing issues?

  • I have read all the edgy.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of edgy.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.10.2

Operating system/version

Windows 11

Describe the bug

When two pinned entries in the same layout have the same title, and an unpinned window triggers opening the layout for the first time, vim.api.nvim_buf_set_name spam-fails
Note that this does not happen when opening the layout through the api, or by opening a buffer matching one of the pinned entries.

Steps To Reproduce

  1. Have 3 Items in single layout: 2 pinned with the same title, and one unpinned.
  2. Open the unpinned buffer
  3. Profit

Expected Behavior

Edgy opens the layout without any issues.

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
	spec = {
		{
                        -- To Visualize that the api call spam-fails.
			"rcarriga/nvim-notify",
			lazy = false,
			config = function()
				vim.notify = require("notify")
			end,
		},
		{
			"folke/edgy.nvim",
			opts = {
				bottom = {

					{ ft = "something", title = "SameThing", pinned = true},
					{ ft = "somethingelse", title = "SameThing", pinned = true },
					{
						ft = "help"
					},
				},
			},
		},
	},
})

vim.cmd("h")
@a-usr a-usr added the bug Something isn't working label Nov 6, 2024
@a-usr a-usr changed the title bug: Two same pinned titles collide when both are un-initialized bug: Two pinned entries with identical titles collide when both are un-initialized Nov 6, 2024
Copy link
Contributor

github-actions bot commented Dec 7, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Dec 7, 2024
@a-usr
Copy link
Author

a-usr commented Dec 9, 2024

still relevant

@github-actions github-actions bot removed the stale label Dec 10, 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
Projects
None yet
Development

No branches or pull requests

1 participant