@@ -10,6 +10,7 @@ local panes = {
10
10
{
11
11
name = " First" ,
12
12
render = function (self )
13
+ vim .bo [self .bufnr ].filetype = " local"
13
14
vim .b [self .bufnr ].name = " first"
14
15
return true
15
16
end ,
@@ -24,6 +25,7 @@ local panes = {
24
25
25
26
local group = paneui .create_pane_group (" test_panes_1" , panes , {
26
27
on_init = function (self )
28
+ vim .bo [self .bufnr ].filetype = " global"
27
29
utils .nvim_lazy_set_wo (self .bufnr , " winbar" , " this-is-a-winbar" )
28
30
end ,
29
31
})
@@ -38,6 +40,7 @@ describe("ui.panes", function()
38
40
-- enter the pane
39
41
group :enter (0 )
40
42
assert .same (" first" , vim .b .name )
43
+ assert .same (" local" , vim .bo .filetype )
41
44
assert .same (" this-is-a-winbar" , vim .api .nvim_get_option_value (" winbar" , { scope = " local" }))
42
45
43
46
-- cycle to second pane
@@ -58,7 +61,7 @@ describe("ui.panes", function()
58
61
end )
59
62
it (" initialize the buffer back after unloaded" , function ()
60
63
-- ensure there is only one window
61
- vim .cmd (" wincmd o" )
64
+ vim .cmd (" silent wincmd o" )
62
65
assert .same (1 , vim .api .nvim_get_current_buf ())
63
66
group :enter (0 )
64
67
local pane_buf = vim .api .nvim_get_current_buf ()
0 commit comments