0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.0.1714: term_setsize() does not give an error in a normal buffer

Problem:    Term_setsize() does not give an error in a normal buffer.
Solution:   Add an error message.
This commit is contained in:
Bram Moolenaar
2018-04-14 21:31:35 +02:00
parent b3623a382a
commit 6e72cd0d72
3 changed files with 30 additions and 1 deletions

View File

@@ -4629,7 +4629,12 @@ f_term_setsize(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
term_T *term;
varnumber_T rows, cols;
if (buf == NULL || buf->b_term->tl_vterm == NULL)
if (buf == NULL)
{
EMSG(_("E955: Not a terminal buffer"));
return;
}
if (buf->b_term->tl_vterm == NULL)
return;
term = buf->b_term;
rows = get_tv_number(&argvars[1]);