To: vim_dev@googlegroups.com Subject: Patch 8.2.0237 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0237 Problem: Crash when setting 'wincolor' on finished terminal window. (Bakudankun) Solution: Check that the vterm is not NULL. (Yasuhiro Matsumoto, closes #5607, closes #5610) Files: src/terminal.c, src/testdir/test_terminal.vim *** ../vim-8.2.0236/src/terminal.c 2020-02-02 15:25:10.097976117 +0100 --- src/terminal.c 2020-02-10 20:24:09.082944128 +0100 *************** *** 4276,4281 **** --- 4276,4283 ---- { 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), *** ../vim-8.2.0236/src/testdir/test_terminal.vim 2020-02-07 22:20:50.080383543 +0100 --- src/testdir/test_terminal.vim 2020-02-10 20:32:21.469329650 +0100 *************** *** 2370,2372 **** --- 2370,2387 ---- 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 *** ../vim-8.2.0236/src/version.c 2020-02-09 14:27:15.979648771 +0100 --- src/version.c 2020-02-10 20:25:45.074646128 +0100 *************** *** 744,745 **** --- 744,747 ---- { /* Add new patch number below this line */ + /**/ + 237, /**/ -- The real trick is this: to keep the lines as short as possible and keep the size the same yet free from the need for hyphena- Dammit!! (Matthew Winn) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///