aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core/job_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-11-08 06:29:58 +0800
committerGitHub <noreply@github.com>2023-11-08 06:29:58 +0800
commit1c71c32b29100b3e2989447da9d94b97b2c9959e (patch)
tree9d68705cddd3f8fa13927b25085979e395c3490c /test/functional/core/job_spec.lua
parentcd31a72f9b22741c6ece1c47a91d990e2df218fa (diff)
downloadrneovim-1c71c32b29100b3e2989447da9d94b97b2c9959e.tar.gz
rneovim-1c71c32b29100b3e2989447da9d94b97b2c9959e.tar.bz2
rneovim-1c71c32b29100b3e2989447da9d94b97b2c9959e.zip
fix(job-control): make jobwait() flush UI after hiding cursor (#25927)
Diffstat (limited to 'test/functional/core/job_spec.lua')
-rw-r--r--test/functional/core/job_spec.lua23
1 files changed, 22 insertions, 1 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua
index 613dff577a..befbd4bc3b 100644
--- a/test/functional/core/job_spec.lua
+++ b/test/functional/core/job_spec.lua
@@ -700,7 +700,7 @@ describe('jobs', function()
os.remove('Xtest_jobstart_env')
end)
- describe('jobwait', function()
+ describe('jobwait()', function()
before_each(function()
if is_os('win') then
helpers.set_shell_powershell()
@@ -874,6 +874,27 @@ describe('jobs', function()
eq({'notification', 'wait', {{-1, -1}}}, next_msg())
end)
end)
+
+ it('hides cursor when waiting', function()
+ local screen = Screen.new(30, 3)
+ screen:set_default_attr_ids({
+ [0] = {foreground = Screen.colors.Blue1, bold = true};
+ })
+ screen:attach()
+ command([[let g:id = jobstart([v:progpath, '--clean', '--headless'])]])
+ feed_command('call jobwait([g:id], 300)')
+ screen:expect{grid=[[
+ |
+ {0:~ }|
+ :call jobwait([g:id], 300) |
+ ]], timeout=100}
+ funcs.jobstop(meths.get_var('id'))
+ screen:expect{grid=[[
+ ^ |
+ {0:~ }|
+ :call jobwait([g:id], 300) |
+ ]]}
+ end)
end)
pending('exit event follows stdout, stderr', function()