Mercurial > vim
diff src/testdir/test_terminal.vim @ 14459:ecf6c05d8ac3 v8.1.0243
patch 8.1.0243: using :term ++close ++hidden closes a window
commit https://github.com/vim/vim/commit/5db7eec42337f0eecdc332f582eecf37278044e8
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 7 16:33:18 2018 +0200
patch 8.1.0243: using :term ++close ++hidden closes a window
Problem: Using :term ++close ++hidden closes a window. (Marcin Szamotulski)
Solution: Don't close the window if only using it temporarily for unloading
the terminal buffer. (closes #3287)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 07 Aug 2018 16:45:05 +0200 |
parents | 5faab0545f3c |
children | cb07193c6257 |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -1621,3 +1621,15 @@ func Test_terminal_hidden() call WaitForAssert({-> assert_equal('finished', term_getstatus(bnr))}) bwipe! endfunc + +func Test_terminal_hidden_and_close() + if !has('unix') + return + endif + call assert_equal(1, winnr('$')) + term ++hidden ++close ls + let bnr = bufnr('$') + call assert_equal('terminal', getbufvar(bnr, '&buftype')) + call WaitForAssert({-> assert_false(bufexists(bnr))}) + call assert_equal(1, winnr('$')) +endfunc