Skip to content

Commit 3a05ce6

Browse files
committed
patch 8.2.0373: type of term_sendkeys() is unknown
Problem: Type of term_sendkeys() is unknown. Solution: Just return zero. (closes #5762)
1 parent 66b9885 commit 3a05ce6

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/terminal.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5746,13 +5746,12 @@ f_term_scrape(typval_T *argvars, typval_T *rettv)
57465746
* "term_sendkeys(buf, keys)" function
57475747
*/
57485748
void
5749-
f_term_sendkeys(typval_T *argvars, typval_T *rettv)
5749+
f_term_sendkeys(typval_T *argvars, typval_T *rettv UNUSED)
57505750
{
57515751
buf_T *buf = term_get_buf(argvars, "term_sendkeys()");
57525752
char_u *msg;
57535753
term_T *term;
57545754

5755-
rettv->v_type = VAR_UNKNOWN;
57565755
if (buf == NULL)
57575756
return;
57585757

src/testdir/test_terminal.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,11 @@ func Test_terminal_postponed_scrollback()
368368
call term_wait(buf)
369369
call term_sendkeys(buf, "exit\<CR>")
370370
call term_wait(buf)
371-
call term_sendkeys(buf, ":q\<CR>")
371+
let tsk_ret = term_sendkeys(buf, ":q\<CR>")
372+
373+
" check type of term_sendkeys() return value
374+
echo type(tsk_ret)
375+
372376
call StopVimInTerminal(buf)
373377
call delete('XTest_postponed')
374378
call delete('Xtext')

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
373,
741743
/**/
742744
372,
743745
/**/

0 commit comments

Comments
 (0)