Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
14310:d8b3135ad9a4 | 14311:83b870d9ac4b |
---|---|
1523 endfor | 1523 endfor |
1524 | 1524 |
1525 exe buf . 'bwipe!' | 1525 exe buf . 'bwipe!' |
1526 endfunc | 1526 endfunc |
1527 | 1527 |
1528 " Resizing the terminal window caused an ml_get error. | |
1529 " TODO: This does not reproduce the original problem. | |
1530 func Test_terminal_resize() | |
1531 set statusline=x | |
1532 terminal | |
1533 call assert_equal(2, winnr('$')) | |
1534 | |
1535 " Fill the terminal with text. | |
1536 if has('win32') | |
1537 call feedkeys("dir\<CR>", 'xt') | |
1538 else | |
1539 call feedkeys("ls\<CR>", 'xt') | |
1540 endif | |
1541 " Go to Terminal-Normal mode for a moment. | |
1542 call feedkeys("\<C-W>N", 'xt') | |
1543 " Open a new window | |
1544 call feedkeys("i\<C-W>n", 'xt') | |
1545 call assert_equal(3, winnr('$')) | |
1546 redraw | |
1547 | |
1548 close | |
1549 call assert_equal(2, winnr('$')) | |
1550 call feedkeys("exit\<CR>", 'xt') | |
1551 set statusline& | |
1552 endfunc | |
1553 | |
1528 " must be nearly the last, we can't go back from GUI to terminal | 1554 " must be nearly the last, we can't go back from GUI to terminal |
1529 func Test_zz1_terminal_in_gui() | 1555 func Test_zz1_terminal_in_gui() |
1530 if !CanRunGui() | 1556 if !CanRunGui() |
1531 return | 1557 return |
1532 endif | 1558 endif |