mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.2944: Vim9: no error when using job or channel as a string
Problem: Vim9: no error when using job or channel as a string. Solution: Be more strict about conversion to string. (closes #8312)
This commit is contained in:
@@ -5060,7 +5060,8 @@ echo_string_core(
|
||||
case VAR_JOB:
|
||||
case VAR_CHANNEL:
|
||||
*tofree = NULL;
|
||||
r = tv_get_string_buf(tv, numbuf);
|
||||
r = tv->v_type == VAR_JOB ? job_to_string_buf(tv, numbuf)
|
||||
: channel_to_string_buf(tv, numbuf);
|
||||
if (composite_val)
|
||||
{
|
||||
*tofree = string_quote(r, FALSE);
|
||||
|
Reference in New Issue
Block a user