mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 05:05:00 -07:00
fix(job-control): make jobwait() flush UI after hiding cursor (#25927)
This commit is contained in:
parent
cd31a72f9b
commit
1c71c32b29
@ -4187,6 +4187,7 @@ static void f_jobwait(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
}
|
||||
|
||||
ui_busy_start();
|
||||
ui_flush();
|
||||
list_T *args = argvars[0].vval.v_list;
|
||||
Channel **jobs = xcalloc((size_t)tv_list_len(args), sizeof(*jobs));
|
||||
MultiQueue *waiting_jobs = multiqueue_new_parent(loop_on_put, &main_loop);
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user