Mercurial > vim
diff src/testdir/test_terminal.vim @ 14311:83b870d9ac4b v8.1.0171
patch 8.1.0171: typing CTRL-W n in a terminal window causes ml_get error
commit https://github.com/vim/vim/commit/875cf8789426cc258d85358ea2c86744a5a87b16
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 8 20:49:07 2018 +0200
patch 8.1.0171: typing CTRL-W n in a terminal window causes ml_get error
Problem: Typing CTRL-W n in a terminal window causes ml_get error.
Solution: When resizing the terminal outside of terminal_loop() make sure
the snapshot is complete.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 08 Jul 2018 21:00:07 +0200 |
parents | 43efca4c482f |
children | 5faab0545f3c |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -1525,6 +1525,32 @@ func Test_terminwinscroll() exe buf . 'bwipe!' endfunc +" Resizing the terminal window caused an ml_get error. +" TODO: This does not reproduce the original problem. +func Test_terminal_resize() + set statusline=x + terminal + call assert_equal(2, winnr('$')) + + " Fill the terminal with text. + if has('win32') + call feedkeys("dir\<CR>", 'xt') + else + call feedkeys("ls\<CR>", 'xt') + endif + " Go to Terminal-Normal mode for a moment. + call feedkeys("\<C-W>N", 'xt') + " Open a new window + call feedkeys("i\<C-W>n", 'xt') + call assert_equal(3, winnr('$')) + redraw + + close + call assert_equal(2, winnr('$')) + call feedkeys("exit\<CR>", 'xt') + set statusline& +endfunc + " must be nearly the last, we can't go back from GUI to terminal func Test_zz1_terminal_in_gui() if !CanRunGui()