diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-05-02 21:10:01 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-12-31 13:25:26 +0100 |
commit | 43e8ec92de9e0850e7d202cb7ff9051bc408447e (patch) | |
tree | fcaef65604e05fb9cc34cf7543c7d92af9c38dcf /test/functional/helpers.lua | |
parent | 24488169564c39a506c235bf6a33b8e23a8cb528 (diff) | |
download | rneovim-43e8ec92de9e0850e7d202cb7ff9051bc408447e.tar.gz rneovim-43e8ec92de9e0850e7d202cb7ff9051bc408447e.tar.bz2 rneovim-43e8ec92de9e0850e7d202cb7ff9051bc408447e.zip |
fix(tui): more work in the TUI
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index ca59eb3182..a14bedbbbd 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -243,7 +243,7 @@ function module.run_session(lsession, request_cb, notification_cb, setup_cb, tim end loop_running = true - session:run(on_request, on_notification, on_setup, timeout) + lsession:run(on_request, on_notification, on_setup, timeout) loop_running = false if last_error then local err = last_error @@ -251,7 +251,7 @@ function module.run_session(lsession, request_cb, notification_cb, setup_cb, tim error(err) end - return session.eof_err + return lsession.eof_err end function module.run(request_cb, notification_cb, setup_cb, timeout) @@ -465,8 +465,14 @@ end -- clear('-e') -- clear{args={'-e'}, args_rm={'-i'}, env={TERM=term}} function module.clear(...) + module.set_session(module.spawn_argv(false, ...)) +end + +-- same params as clear, but does returns the session instead +-- of replacing the default session +function module.spawn_argv(keep, ...) local argv, env, io_extra = module.new_argv(...) - module.set_session(module.spawn(argv, nil, env, nil, io_extra)) + return module.spawn(argv, nil, env, keep, io_extra) end -- Builds an argument list for use in clear(). |