Mercurial > vim
diff src/channel.c @ 21851:727820154b1a v8.2.1475
patch 8.2.1475: Vim9: can't use v:true for option flags
Commit: https://github.com/vim/vim/commit/36967b32fd02eaab4273c1a1e7a1210a5fe45d09
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 17 21:41:02 2020 +0200
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 https://github.com/vim/vim/issues/6725)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 17 Aug 2020 21:45:03 +0200 |
parents | 2c40e60017a8 |
children | 88070e222e82 |
line wrap: on
line diff
--- a/src/channel.c +++ b/src/channel.c @@ -4922,7 +4922,7 @@ get_job_options(typval_T *tv, jobopt_T * { 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 * { 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 * 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 * 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 * 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 * 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) {