Mercurial > vim
changeset 19633:dd3e5533a7d2 v8.2.0373
patch 8.2.0373: type of term_sendkeys() is unknown
Commit: https://github.com/vim/vim/commit/3a05ce63feae040cd817be289e84c2a7e653d59d
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 11 19:30:01 2020 +0100
patch 8.2.0373: type of term_sendkeys() is unknown
Problem: Type of term_sendkeys() is unknown.
Solution: Just return zero. (closes https://github.com/vim/vim/issues/5762)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 11 Mar 2020 21:31:04 +0100 |
parents | 182d7acd6737 |
children | d70e059c4c30 |
files | src/terminal.c src/testdir/test_terminal.vim src/version.c |
diffstat | 3 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/terminal.c +++ b/src/terminal.c @@ -5746,13 +5746,12 @@ f_term_scrape(typval_T *argvars, typval_ * "term_sendkeys(buf, keys)" function */ void -f_term_sendkeys(typval_T *argvars, typval_T *rettv) +f_term_sendkeys(typval_T *argvars, typval_T *rettv UNUSED) { buf_T *buf = term_get_buf(argvars, "term_sendkeys()"); char_u *msg; term_T *term; - rettv->v_type = VAR_UNKNOWN; if (buf == NULL) return;
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -368,7 +368,11 @@ func Test_terminal_postponed_scrollback( call term_wait(buf) call term_sendkeys(buf, "exit\<CR>") call term_wait(buf) - call term_sendkeys(buf, ":q\<CR>") + let tsk_ret = term_sendkeys(buf, ":q\<CR>") + + " check type of term_sendkeys() return value + echo type(tsk_ret) + call StopVimInTerminal(buf) call delete('XTest_postponed') call delete('Xtext')