diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-11-11 22:15:19 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-11-14 12:40:57 +0100 |
commit | e61228a214ebda9845db9462dad0a8c362d3963f (patch) | |
tree | fc5908c85c0cc6affc3bc325cd75f6efaeea95d8 /test/functional/ui/linematch_spec.lua | |
parent | 40dee8a2dcba996badaa6182eb34fde1694f92a3 (diff) | |
download | rneovim-e61228a214ebda9845db9462dad0a8c362d3963f.tar.gz rneovim-e61228a214ebda9845db9462dad0a8c362d3963f.tar.bz2 rneovim-e61228a214ebda9845db9462dad0a8c362d3963f.zip |
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.
Diffstat (limited to 'test/functional/ui/linematch_spec.lua')
-rw-r--r-- | test/functional/ui/linematch_spec.lua | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/test/functional/ui/linematch_spec.lua b/test/functional/ui/linematch_spec.lua index 03eed5a49c..b564c01eaa 100644 --- a/test/functional/ui/linematch_spec.lua +++ b/test/functional/ui/linematch_spec.lua @@ -38,7 +38,6 @@ describe('Diff mode screen with 3 diffs open', function() feed(':windo diffthis<cr>') screen = Screen.new(100, 16) - screen:attach() feed('<c-w>=') feed(':windo set nu!<cr>') end) @@ -217,7 +216,6 @@ describe('Diff mode screen with 2 diffs open', function() feed(':windo diffthis<cr>') screen = Screen.new(100, 20) - screen:attach() feed('<c-w>=') feed(':windo set nu!<cr>') end) @@ -1093,7 +1091,6 @@ describe('regressions', function() clear() feed(':set diffopt+=linematch:30<cr>') screen = Screen.new(100, 20) - screen:attach() -- line must be greater than MATCH_CHAR_MAX_LEN n.api.nvim_buf_set_lines(0, 0, -1, false, { string.rep('a', 1000) .. 'hello' }) n.exec 'vnew' @@ -1105,7 +1102,6 @@ describe('regressions', function() clear() feed(':set diffopt+=linematch:10<cr>') screen = Screen.new(100, 20) - screen:attach() local lines = {} for i = 0, 29 do lines[#lines + 1] = tostring(i) |