diff options
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 |