1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2019-09-26 23:08:54 +02:00
parent d2c1fb476d
commit d2842ea60b
10 changed files with 220 additions and 35 deletions

View File

@@ -61,11 +61,16 @@ func RunVimInTerminal(arguments, options)
let cmd = GetVimCommandCleanTerm() .. a:arguments
let buf = term_start(cmd, {
let options = {
\ 'curwin': 1,
\ 'term_rows': rows,
\ 'term_cols': cols,
\ })
\ }
" Accept other options whose name starts with 'term_'.
call extend(options, filter(copy(a:options), 'v:key =~# "^term_"'))
let buf = term_start(cmd, options)
if &termwinsize == ''
" in the GUI we may end up with a different size, try to set it.
if term_getsize(buf) != [rows, cols]