aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-03-19 15:28:24 +0800
committerGitHub <noreply@github.com>2025-03-19 07:28:24 +0000
commit63bbb7c109a5db1520148168c40e0e5ce512a41f (patch)
tree4e0536171f0900fae6a23a4f700cd4910f322d54 /test
parent190d0241e2a0cd4ec4bcb520772db835df935530 (diff)
downloadrneovim-63bbb7c109a5db1520148168c40e0e5ce512a41f.tar.gz
rneovim-63bbb7c109a5db1520148168c40e0e5ce512a41f.tar.bz2
rneovim-63bbb7c109a5db1520148168c40e0e5ce512a41f.zip
fix(api): fix 'winborder' preventing splits with nvim_open_win (#32981)
While at it, rename the p_winbd variable to p_winborder, as 'winbd' is not the option's short name. Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/functional/api/window_spec.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua
index 028f0beb38..119c185b72 100644
--- a/test/functional/api/window_spec.lua
+++ b/test/functional/api/window_spec.lua
@@ -1825,6 +1825,14 @@ describe('API/win', function()
)
end)
+ it("can create split window when 'winborder' is set", function()
+ local old_win = api.nvim_get_current_win()
+ api.nvim_set_option_value('winborder', 'single', {})
+ local new_win = api.nvim_open_win(0, false, { split = 'right', win = 0 })
+ eq({ 'row', { { 'leaf', old_win }, { 'leaf', new_win } } }, fn.winlayout())
+ eq('', api.nvim_win_get_config(new_win).relative)
+ end)
+
describe("with 'autochdir'", function()
local topdir
local otherbuf