diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-17 21:41:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-17 21:41:02 +0200 |
commit | 36967b32fd02eaab4273c1a1e7a1210a5fe45d09 (patch) | |
tree | 34de67c1d4d14063179da865bd40c6982fc29904 /src/channel.c | |
parent | 624b6eaf20f3e8c669425b6a32f17fb9ec2ebbd2 (diff) |
patch 8.2.1475: Vim9: can't use v:true for option flagsv8.2.1475
Problem: Vim9: can't use v:true for option flags.
Solution: Add tv_get_bool_chk(). (closes #6725)
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/channel.c b/src/channel.c index f20a4d851d..3e7ec96598 100644 --- a/src/channel.c +++ b/src/channel.c @@ -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) { |