forked from aniani/vim
patch 8.2.1475: Vim9: can't use v:true for option flags
Problem: Vim9: can't use v:true for option flags. Solution: Add tv_get_bool_chk(). (closes #6725)
This commit is contained in:
@@ -4922,7 +4922,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
|
||||
{
|
||||
if (!(supported & JO_MODE))
|
||||
break;
|
||||
opt->jo_noblock = tv_get_number(item);
|
||||
opt->jo_noblock = tv_get_bool(item);
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "in_io") == 0
|
||||
|| STRCMP(hi->hi_key, "out_io") == 0
|
||||
@@ -4949,7 +4949,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
|
||||
{
|
||||
if (!(supported & JO_MODE))
|
||||
break;
|
||||
opt->jo_pty = tv_get_number(item);
|
||||
opt->jo_pty = tv_get_bool(item);
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "in_buf") == 0
|
||||
|| STRCMP(hi->hi_key, "out_buf") == 0
|
||||
@@ -4980,7 +4980,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
|
||||
if (!(supported & JO_OUT_IO))
|
||||
break;
|
||||
opt->jo_set |= JO_OUT_MODIFIABLE << (part - PART_OUT);
|
||||
opt->jo_modifiable[part] = tv_get_number(item);
|
||||
opt->jo_modifiable[part] = tv_get_bool(item);
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "out_msg") == 0
|
||||
|| STRCMP(hi->hi_key, "err_msg") == 0)
|
||||
@@ -4990,7 +4990,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
|
||||
if (!(supported & JO_OUT_IO))
|
||||
break;
|
||||
opt->jo_set2 |= JO2_OUT_MSG << (part - PART_OUT);
|
||||
opt->jo_message[part] = tv_get_number(item);
|
||||
opt->jo_message[part] = tv_get_bool(item);
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "in_top") == 0
|
||||
|| STRCMP(hi->hi_key, "in_bot") == 0)
|
||||
@@ -5184,7 +5184,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
|
||||
if (!(supported2 & JO2_VERTICAL))
|
||||
break;
|
||||
opt->jo_set2 |= JO2_VERTICAL;
|
||||
opt->jo_vertical = tv_get_number(item);
|
||||
opt->jo_vertical = tv_get_bool(item);
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "curwin") == 0)
|
||||
{
|
||||
@@ -5224,14 +5224,14 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
|
||||
if (!(supported2 & JO2_HIDDEN))
|
||||
break;
|
||||
opt->jo_set2 |= JO2_HIDDEN;
|
||||
opt->jo_hidden = tv_get_number(item);
|
||||
opt->jo_hidden = tv_get_bool(item);
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "norestore") == 0)
|
||||
{
|
||||
if (!(supported2 & JO2_NORESTORE))
|
||||
break;
|
||||
opt->jo_set2 |= JO2_NORESTORE;
|
||||
opt->jo_term_norestore = tv_get_number(item);
|
||||
opt->jo_term_norestore = tv_get_bool(item);
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "term_kill") == 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user