fix(tests): needing two calls to setup a screen is cringe

Before calling "attach" a screen object is just a dummy container for
(row, col) values whose purpose is to be sent as part of the "attach"
function call anyway.

Just create the screen in an attached state directly. Keep the complete
(row, col, options) config together. It is still completely valid to
later detach and re-attach as needed, including to another session.
This commit is contained in:
bfredl
2024-11-11 22:15:19 +01:00
parent 40dee8a2dc
commit e61228a214
161 changed files with 128 additions and 606 deletions

View File

@ -16,8 +16,7 @@ describe('ext_multigrid', function()
before_each(function()
clear{args_rm={'--headless'}, args={'--cmd', 'set laststatus=2'}}
screen = Screen.new(53,14)
screen:attach({ext_multigrid=true})
screen = Screen.new(53,14, {ext_multigrid=true})
screen:set_default_attr_ids({
[1] = {bold = true, foreground = Screen.colors.Blue1},
[2] = {foreground = Screen.colors.Magenta},