diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-04 18:34:09 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-04 18:34:09 +0200 |
commit | b936b79424d435b83cdebed5507a9d3800e66e6c (patch) | |
tree | c7588f88311da5ef1d4217c94a9825174ca4e4c4 /src/testdir/term_util.vim | |
parent | 077cc7aa0e0c431e97795612374fe17fe7c88803 (diff) |
patch 8.2.1589: term_start() options for size are overruled by 'termwinsize'v8.2.1589
Problem: Term_start() options for size are overruled by 'termwinsize'.
(Sergey Vlasov)
Solution: Set 'termwinsize' to the specified size.
Diffstat (limited to 'src/testdir/term_util.vim')
-rw-r--r-- | src/testdir/term_util.vim | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/testdir/term_util.vim b/src/testdir/term_util.vim index 17f9752a99..4a5e64989b 100644 --- a/src/testdir/term_util.vim +++ b/src/testdir/term_util.vim @@ -73,7 +73,8 @@ func RunVimInTerminal(arguments, options) set t_Co=256 background=light hi Normal ctermfg=NONE ctermbg=NONE - " Make the window 20 lines high and 75 columns, unless told otherwise. + " Make the window 20 lines high and 75 columns, unless told otherwise or + " 'termwinsize' is set. let rows = get(a:options, 'rows', 20) let cols = get(a:options, 'cols', 75) let statusoff = get(a:options, 'statusoff', 1) @@ -86,11 +87,12 @@ func RunVimInTerminal(arguments, options) let cmd = GetVimCommandCleanTerm() .. reset_u7 .. a:arguments - let options = { - \ 'curwin': 1, - \ 'term_rows': rows, - \ 'term_cols': cols, - \ } + let options = #{curwin: 1} + if &termwinsize == '' + let options.term_rows = rows + let options.term_cols = cols + endif + " Accept other options whose name starts with 'term_'. call extend(options, filter(copy(a:options), 'v:key =~# "^term_"')) |