1
0
forked from aniani/vim

patch 8.2.2061: Vim9: E1030 error when using empty string for term_sendkeys()

Problem:    Vim9: E1030 error when using empty string for term_sendkeys().
Solution:   Don't check for an invalid type unless the terminal can't be
            found. (closes #7382)
This commit is contained in:
Bram Moolenaar
2020-11-27 20:55:00 +01:00
parent aeb313f355
commit 4d05af0a64
3 changed files with 11 additions and 9 deletions

View File

@@ -4595,12 +4595,12 @@ term_get_buf(typval_T *argvars, char *where)
{
buf_T *buf;
(void)tv_get_number(&argvars[0]); // issue errmsg if type error
++emsg_off;
buf = tv_get_buf(&argvars[0], FALSE);
--emsg_off;
if (buf == NULL || buf->b_term == NULL)
{
(void)tv_get_number(&argvars[0]); // issue errmsg if type error
ch_log(NULL, "%s: invalid buffer argument", where);
return NULL;
}