mirror of
https://github.com/neovim/neovim.git
synced 2026-04-22 15:25:30 +00:00
feat(float): add rounded borders preset
Add `borders = "rounded"` preset for `nvim_open_win`, equivalent to
border = {"╭", "─", "╮", "│", "╯", "─", "╰", "│"}
Also add undocumented "solid" preset to docs.
This commit is contained in:
@@ -711,6 +711,49 @@ describe('float window', function()
|
||||
]]}
|
||||
end
|
||||
|
||||
meths.win_set_config(win, {border="rounded"})
|
||||
if multigrid then
|
||||
screen:expect{grid=[[
|
||||
## grid 1
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
[3:----------------------------------------]|
|
||||
## grid 2
|
||||
^ |
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
## grid 3
|
||||
|
|
||||
## grid 5
|
||||
{5:╭─────────╮}|
|
||||
{5:│}{1: halloj! }{5:│}|
|
||||
{5:│}{1: BORDAA }{5:│}|
|
||||
{5:╰─────────╯}|
|
||||
]], float_pos={
|
||||
[5] = { { id = 1002 }, "NW", 1, 2, 5, true }
|
||||
}, win_viewport={
|
||||
[2] = {win = {id = 1000}, topline = 0, botline = 2, curline = 0, curcol = 0};
|
||||
[5] = {win = {id = 1002}, topline = 0, botline = 2, curline = 0, curcol = 0};
|
||||
}}
|
||||
else
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{0:~ }|
|
||||
{0:~ }{5:╭─────────╮}{0: }|
|
||||
{0:~ }{5:│}{1: halloj! }{5:│}{0: }|
|
||||
{0:~ }{5:│}{1: BORDAA }{5:│}{0: }|
|
||||
{0:~ }{5:╰─────────╯}{0: }|
|
||||
|
|
||||
]]}
|
||||
end
|
||||
|
||||
meths.win_set_config(win, {border="solid"})
|
||||
if multigrid then
|
||||
screen:expect{grid=[[
|
||||
|
||||
Reference in New Issue
Block a user