Skip to content

Commit aeb4e0c

Browse files
committed
(mini.animate tests) Update test for scroll inside terminal.
1 parent f4e9507 commit aeb4e0c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_animate.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -1779,11 +1779,13 @@ T['Scroll']['works properly inside terminal'] = function()
17791779
-- compared with what was at Terminal mode start
17801780
local many_lines = string.rep([[a\n]], 20)
17811781
type_keys(10, 'i', 'echo -e "' .. many_lines .. '"', '<CR>')
1782+
sleep(step_time)
17821783

17831784
-- There should not be any scroll animation after exiting Terminal mode
1785+
local init_line = child.fn.line('w0')
17841786
type_keys([[<C-\>]], '<C-n>')
1785-
sleep(step_time)
1786-
eq(child.fn.line('w0'), 18)
1787+
sleep(2 * step_time)
1788+
eq(child.fn.line('w0'), init_line)
17871789
end
17881790

17891791
T['Scroll']['does not automatically animate after buffer change'] = function()

0 commit comments

Comments
 (0)