Mercurial > vim
comparison src/testdir/test_terminal.vim @ 12056:0498547dace0 v8.0.0908
patch 8.0.0908: cannot set terminal size with options
commit https://github.com/vim/vim/commit/08d384ff3aa0366c18fb87ed215b1b4bdf9b1745
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 11 21:51:23 2017 +0200
patch 8.0.0908: cannot set terminal size with options
Problem: Cannot set terminal size with options.
Solution: Add "term_rows", "term_cols" and "vertical".
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 11 Aug 2017 22:00:05 +0200 |
parents | 278aabefc7f9 |
children | a879814b8a37 |
comparison
equal
deleted
inserted
replaced
12055:8dce424b095b | 12056:0498547dace0 |
---|---|
245 exe '5terminal ' . cmd | 245 exe '5terminal ' . cmd |
246 let size = term_getsize('') | 246 let size = term_getsize('') |
247 bwipe! | 247 bwipe! |
248 call assert_equal(5, size[0]) | 248 call assert_equal(5, size[0]) |
249 | 249 |
250 call term_start(cmd, {'term_rows': 6}) | |
251 let size = term_getsize('') | |
252 bwipe! | |
253 call assert_equal(6, size[0]) | |
254 | |
250 vsplit | 255 vsplit |
251 exe '5,33terminal ' . cmd | 256 exe '5,33terminal ' . cmd |
252 let size = term_getsize('') | 257 let size = term_getsize('') |
253 bwipe! | 258 bwipe! |
254 call assert_equal([5, 33], size) | 259 call assert_equal([5, 33], size) |
255 | 260 |
261 call term_start(cmd, {'term_rows': 6, 'term_cols': 36}) | |
262 let size = term_getsize('') | |
263 bwipe! | |
264 call assert_equal([6, 36], size) | |
265 | |
256 exe 'vertical 20terminal ' . cmd | 266 exe 'vertical 20terminal ' . cmd |
257 let size = term_getsize('') | 267 let size = term_getsize('') |
258 bwipe! | 268 bwipe! |
259 call assert_equal(20, size[1]) | 269 call assert_equal(20, size[1]) |
270 | |
271 call term_start(cmd, {'vertical': 1, 'term_cols': 26}) | |
272 let size = term_getsize('') | |
273 bwipe! | |
274 call assert_equal(26, size[1]) | |
260 | 275 |
261 split | 276 split |
262 exe 'vertical 6,20terminal ' . cmd | 277 exe 'vertical 6,20terminal ' . cmd |
263 let size = term_getsize('') | 278 let size = term_getsize('') |
264 bwipe! | 279 bwipe! |
265 call assert_equal([6, 20], size) | 280 call assert_equal([6, 20], size) |
281 | |
282 call term_start(cmd, {'vertical': 1, 'term_rows': 7, 'term_cols': 27}) | |
283 let size = term_getsize('') | |
284 bwipe! | |
285 call assert_equal([7, 27], size) | |
286 | |
266 endfunc | 287 endfunc |
267 | 288 |
268 func Test_finish_close() | 289 func Test_finish_close() |
269 " TODO: use something that takes much less than a whole second | 290 " TODO: use something that takes much less than a whole second |
270 echo 'This will take five seconds...' | 291 echo 'This will take five seconds...' |