Mercurial > vim
diff src/testdir/test_terminal.vim @ 11975:5cc005cf312f v8.0.0868
patch 8.0.0868: cannot specify the terminal size on the command line
commit https://github.com/vim/vim/commit/cfcc022c54e66b317ddcc8a807977230b056a542
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 5 17:13:48 2017 +0200
patch 8.0.0868: cannot specify the terminal size on the command line
Problem: Cannot specify the terminal size on the command line.
Solution: Use the address range for the terminal size. (Yasuhiro Matsumoto,
closes #1941)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 05 Aug 2017 17:15:04 +0200 |
parents | aec3df2af27c |
children | 0d9bfdb3f6f7 |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -171,3 +171,29 @@ func Test_terminal_scrape() exe buf . 'bwipe' call delete('Xtext') endfunc + +func Test_terminal_size() + let cmd = Get_cat_cmd() + + exe '5terminal ' . cmd + let size = term_getsize('') + bwipe! + call assert_equal(5, size[0]) + + vsplit + exe '5,33terminal ' . cmd + let size = term_getsize('') + bwipe! + call assert_equal([5, 33], size) + + exe 'vertical 20terminal ' . cmd + let size = term_getsize('') + bwipe! + call assert_equal(20, size[1]) + + split + exe 'vertical 6,20terminal ' . cmd + let size = term_getsize('') + bwipe! + call assert_equal([6, 20], size) +endfunc