Problem: Crash when setting 'wincolor' on finished terminal window.
(Bakudankun)
Solution: Check that the vterm is not NULL. (Yasuhiro Matsumoto, closes
#5607, closes #5610)
{
term_T *term = curwin->w_buffer->b_term;
+ if (term->tl_vterm == NULL)
+ return;
init_default_colors(term, curwin);
vterm_state_set_default_colors(
vterm_obtain_state(term->tl_vterm),
call StopVimInTerminal(buf)
call delete('XtermPopup')
endfunc
+
+func Test_issue_5607()
+ let wincount = winnr('$')
+ exe 'terminal' &shell &shellcmdflag 'exit'
+ let job = term_getjob(bufnr())
+ call WaitForAssert({-> assert_equal("dead", job_status(job))})
+
+ let old_wincolor = &wincolor
+ try
+ set wincolor=
+ finally
+ let &wincolor = old_wincolor
+ bw!
+ endtry
+endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 237,
/**/
236,
/**/