feat(window): add support for vim.o.winborder#1957
feat(window): add support for vim.o.winborder#1957iguanacucumber wants to merge 5 commits intofolke:mainfrom
Conversation
|
(i created a submodule while testing this and git submodules are cumberson, but now it's good) |
|
@folke can you look into this please? |
It is not currently in upstream. Link: mason-org/mason.nvim#1900 Link: folke/lazy.nvim#1957 Signed-off-by: Tristan Partin <[email protected]>
|
This PR is stale because it has been open 30 days with no activity. |
| 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", |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Something like:
local border = self.opts.border or vim.fn.exists("&winborder") == 1 and vim.o.winborder or "none"
if border ~= "none" or border ~= "" thenshould work.
winborder defaults to "" which is the same as "none", so we should check that as well
|
This PR is stale because it has been open 30 days with no activity. |
|
Not stale. |
|
@folke please look at this |
Description
When using the new
vim.o.winborderoption to set a border for every floating window, it adds a border to the backdrop. So i forced the border to beborder = "none"Screenshots
with
vim.o.border = "rounded"without the fix:

with the fix:
