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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user