Patch 8.2.0373

12 views
Skip to first unread message

Bram Moolenaar

unread,
Mar 11, 2020, 2:30:53 PM3/11/20
to vim...@googlegroups.com

Patch 8.2.0373
Problem: Type of term_sendkeys() is unknown.
Solution: Just return zero. (closes #5762)
Files: src/terminal.c, src/testdir/test_terminal.vim


*** ../vim-8.2.0372/src/terminal.c 2020-03-11 14:19:53.480369957 +0100
--- src/terminal.c 2020-03-11 19:28:48.621399677 +0100
***************
*** 5746,5758 ****
* "term_sendkeys(buf, keys)" function
*/
void
! f_term_sendkeys(typval_T *argvars, typval_T *rettv)
{
buf_T *buf = term_get_buf(argvars, "term_sendkeys()");
char_u *msg;
term_T *term;

- rettv->v_type = VAR_UNKNOWN;
if (buf == NULL)
return;

--- 5746,5757 ----
* "term_sendkeys(buf, keys)" function
*/
void
! 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;

if (buf == NULL)
return;

*** ../vim-8.2.0372/src/testdir/test_terminal.vim 2020-03-11 14:19:53.480369957 +0100
--- src/testdir/test_terminal.vim 2020-03-11 19:26:21.834030680 +0100
***************
*** 368,374 ****
call term_wait(buf)
call term_sendkeys(buf, "exit\<CR>")
call term_wait(buf)
! call term_sendkeys(buf, ":q\<CR>")
call StopVimInTerminal(buf)
call delete('XTest_postponed')
call delete('Xtext')
--- 368,378 ----
call term_wait(buf)
call term_sendkeys(buf, "exit\<CR>")
call term_wait(buf)
! 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')
*** ../vim-8.2.0372/src/version.c 2020-03-11 19:15:37.641342464 +0100
--- src/version.c 2020-03-11 19:27:53.141643052 +0100
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 373,
/**/

--
hundred-and-one symptoms of being an internet addict:
235. You start naming your kids Pascal, COBOL, Algol and Fortran.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages