diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-08-06 14:26:17 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-08-16 09:13:44 +0200 |
commit | 6a90f53862d9f75f7aeea350944c466aa85f11a2 (patch) | |
tree | d0bfb9c9bbe5fbd97776b87510b693ea4fabc435 /test/functional/ui/screen.lua | |
parent | 8642f05fd91d7285a7d8d2bb13b4d63fe5c371fa (diff) | |
download | rneovim-6a90f53862d9f75f7aeea350944c466aa85f11a2.tar.gz rneovim-6a90f53862d9f75f7aeea350944c466aa85f11a2.tar.bz2 rneovim-6a90f53862d9f75f7aeea350944c466aa85f11a2.zip |
test: cleanup
Diffstat (limited to 'test/functional/ui/screen.lua')
-rw-r--r-- | test/functional/ui/screen.lua | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index 77b69041e0..c1df7ede43 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -176,6 +176,16 @@ function Screen:try_resize(columns, rows) -- Give ourselves a chance to _handle_resize, which requires using -- self.sleep() (for the resize notification) rather than run() self:sleep(0.1) + + -- XXX: On Windows we don't bother to handle SIGWINCH. + -- CTRL-Q invokes the handler in tty-test.c directly. + -- uv_tty_update_virtual_window() _does_ emit SIGWINCH, but: + -- "SIGWINCH may not always be delivered in a timely manner; libuv + -- will only detect size changes when the cursor is being moved." + -- http://docs.libuv.org/en/v1.x/signal.html + if iswin() and 0 ~= nvim('eval', "exists('b:terminal_job_id')") then + nvim('command', [[call jobsend(b:terminal_job_id, "\<C-Q>")]]) + end end -- Asserts that `expected` eventually matches the screen state. @@ -261,17 +271,6 @@ screen:redraw_debug() to show all intermediate screen states. ]]) end) end -function Screen:expect_after_resize(expected) - if iswin() then - retry(nil, nil, function() - nvim('command', 'call jobsend(b:terminal_job_id, "\\<C-q>")') - self:expect(expected) - end) - else - self:expect(expected) - end -end - function Screen:wait(check, timeout) local err, checked = false local success_seen = false |