]> granicus.if.org Git - vim/commitdiff
patch 8.2.0373: type of term_sendkeys() is unknown v8.2.0373
authorBram Moolenaar <Bram@vim.org>
Wed, 11 Mar 2020 18:30:01 +0000 (19:30 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 11 Mar 2020 18:30:01 +0000 (19:30 +0100)
Problem:    Type of term_sendkeys() is unknown.
Solution:   Just return zero. (closes #5762)

src/terminal.c
src/testdir/test_terminal.vim
src/version.c

index 34316d8439320d01e162d1dfdd7b20c3ff47b602..30590b623f8a6373ac926d70447126c76d039a12 100644 (file)
@@ -5746,13 +5746,12 @@ f_term_scrape(typval_T *argvars, typval_T *rettv)
  * "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;
 
index 7bdabb892971e7cf6365435e38e9d39bb16291ee..8d32cbc3731348e98c98b7f256c9270a670ac696 100644 (file)
@@ -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')
index 2bf4b24aa4a6e55d1aa20db8b055fa6871e7011a..e55c26143ad1f66507a060d77f5f5b70643a0f2b 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    373,
 /**/
     372,
 /**/