comparison src/testdir/term_util.vim @ 18170:4ac8161e92e0 v8.1.2080

patch 8.1.2080: the terminal API is limited and can't be disabled Commit: https://github.com/vim/vim/commit/d2842ea60bd608b7f9ec93c77d3f36a8e3bf5fe9 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 26 23:08:54 2019 +0200 patch 8.1.2080: the terminal API is limited and can't be disabled Problem: The terminal API is limited and can't be disabled. Solution: Add term_setapi() to set the function prefix. (Ozaki Kiichi, closes #2907)
author Bram Moolenaar <Bram@vim.org>
date Thu, 26 Sep 2019 23:15:05 +0200
parents 3e2e998ce0db
children c3f506e24eab
comparison
equal deleted inserted replaced
18169:6ad8949a205d 18170:4ac8161e92e0
59 let cols = get(a:options, 'cols', 75) 59 let cols = get(a:options, 'cols', 75)
60 let statusoff = get(a:options, 'statusoff', 1) 60 let statusoff = get(a:options, 'statusoff', 1)
61 61
62 let cmd = GetVimCommandCleanTerm() .. a:arguments 62 let cmd = GetVimCommandCleanTerm() .. a:arguments
63 63
64 let buf = term_start(cmd, { 64 let options = {
65 \ 'curwin': 1, 65 \ 'curwin': 1,
66 \ 'term_rows': rows, 66 \ 'term_rows': rows,
67 \ 'term_cols': cols, 67 \ 'term_cols': cols,
68 \ }) 68 \ }
69 " Accept other options whose name starts with 'term_'.
70 call extend(options, filter(copy(a:options), 'v:key =~# "^term_"'))
71
72 let buf = term_start(cmd, options)
73
69 if &termwinsize == '' 74 if &termwinsize == ''
70 " in the GUI we may end up with a different size, try to set it. 75 " in the GUI we may end up with a different size, try to set it.
71 if term_getsize(buf) != [rows, cols] 76 if term_getsize(buf) != [rows, cols]
72 call term_setsize(buf, rows, cols) 77 call term_setsize(buf, rows, cols)
73 endif 78 endif