@@ -109,6 +109,33 @@ T["setup"]["`left` or `right` buffer options overrides `common` ones"] = functio
109
109
})
110
110
end
111
111
112
+ T [" setup" ][" does not throw on invalid windows" ] = function ()
113
+ child .restart ({ " -u" , " scripts/init_auto_open.lua" })
114
+ child .set_size (80 , 80 )
115
+ child .wait ()
116
+
117
+ Helpers .expect .equality (child .get_wins_in_tab (), { 1001 , 1000 , 1002 })
118
+ Helpers .expect .state (child , " tabs[1].wins.main" , { curr = 1000 , left = 1001 , right = 1002 })
119
+
120
+ child .cmd (" e aaa.txt" )
121
+ child .cmd (" vnew aaa.txt" )
122
+ child .cmd (" mksession! deps/mk.vim" )
123
+
124
+ Helpers .expect .equality (child .get_wins_in_tab (), { 1001 , 1003 , 1000 , 1002 })
125
+ Helpers .expect .state (child , " tabs[1].wins.main" , { curr = 1000 , left = 1001 , right = 1002 })
126
+
127
+ child .restart ({ " -u" , " scripts/init_auto_open.lua" })
128
+ child .wait ()
129
+
130
+ Helpers .expect .equality (child .get_wins_in_tab (), { 1001 , 1000 , 1002 })
131
+
132
+ child .cmd (" source deps/mk.vim" )
133
+ child .wait ()
134
+
135
+ Helpers .expect .equality (child .get_wins_in_tab (), { 1000 , 1003 , 1004 , 1005 })
136
+ Helpers .expect .state (child , " tabs[1].wins.main" , { curr = 1000 , left = 1001 , right = 1002 })
137
+ end
138
+
112
139
T [" setup" ][" `common` options spreads it to `left` and `right` buffers" ] = function ()
113
140
child .cmd ([[ colorscheme peachpuff]] )
114
141
child .lua ([[
0 commit comments