Skip to content

Conversation

iguanacucumber
Copy link

Description

When using the new vim.o.winborder option to set a border for every floating window, it adds a border to the backdrop. So i forced the border to be border = "none"

Screenshots

with vim.o.border = "rounded"

without the fix:
20250323_14h16m59s_grim

with the fix:
20250323_14h17m17s_grim

@iguanacucumber iguanacucumber changed the title fix: do not create a border for the backdrop with vim.o.winborder fix(backdrop): do not create a border for the backdrop with vim.o.winborder Mar 23, 2025
@iguanacucumber iguanacucumber changed the title fix(backdrop): do not create a border for the backdrop with vim.o.winborder fix(window): add support for vim.o.winborder Mar 23, 2025
@iguanacucumber iguanacucumber changed the title fix(window): add support for vim.o.winborder feat(window): add support for vim.o.winborder Mar 23, 2025
@iguanacucumber
Copy link
Author

iguanacucumber commented Mar 23, 2025

(i created a submodule while testing this and git submodules are cumberson, but now it's good)

@ssiyad
Copy link

ssiyad commented Apr 5, 2025

@folke can you look into this please?

tristan957 added a commit to tristan957/dotfiles that referenced this pull request May 3, 2025
It is not currently in upstream.

Link: mason-org/mason.nvim#1900
Link: folke/lazy.nvim#1957
Signed-off-by: Tristan Partin <[email protected]>
Copy link
Contributor

github-actions bot commented May 6, 2025

This PR is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the stale label May 6, 2025
size = Config.options.ui.size,
style = "minimal",
border = Config.options.ui.border or "none",
border = Config.options.ui.border or vim.o.winborder or "none",
Copy link
Contributor

@seblyng seblyng Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work properly with winborder now supporting custom borderchars. See here for example for how it can be supported: Saghen/blink.cmp#1984

It will also probably error for users that are not using nvim 0.11. I think something like this might work:

border = Config.options.ui.border or vim.fn.exists("&winborder") == 0 and "none" or nil,

relative = "editor",
style = self.opts.style ~= "" and self.opts.style or nil,
border = self.opts.border,
border = self.opts.border or vim.o.winborder,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed. The line I posted in the other comment will just have the border be nil, which will default back to winborder without this.

if self.opts.border ~= "none" or vim.o.winborder then
self.win_opts.row = self.win_opts.row - 1
self.win_opts.col = self.win_opts.col - 1
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like:

  local border = self.opts.border or vim.fn.exists("&winborder") == 1 and vim.o.winborder or "none"
  if border ~= "none" or border ~= "" then

should work.

winborder defaults to "" which is the same as "none", so we should check that as well

@github-actions github-actions bot removed the stale label Jul 30, 2025
Copy link
Contributor

This PR is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the stale label Aug 30, 2025
@xfzv
Copy link

xfzv commented Aug 31, 2025

Not stale.

@github-actions github-actions bot removed the stale label Sep 1, 2025
@AtifChy
Copy link

AtifChy commented Sep 25, 2025

@folke please look at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants