Mercurial > vim
diff src/channel.c @ 15746:c017195b121b v8.1.0880
patch 8.1.0880: MS-Windows: inconsistent selection of winpty/conpty
commit https://github.com/vim/vim/commit/c6ddce3f2cf6daa3a545405373b661f8a9bccad9
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Feb 8 12:47:03 2019 +0100
patch 8.1.0880: MS-Windows: inconsistent selection of winpty/conpty
Problem: MS-Windows: inconsistent selection of winpty/conpty.
Solution: Name option 'termwintype', use ++type argument and "term_pty" for
term_start(). (Hirohito Higashi, closes #3915)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 08 Feb 2019 13:00:08 +0100 |
parents | a3e2e7948ee4 |
children | 208bf8b36075 |
line wrap: on
line diff
--- a/src/channel.c +++ b/src/channel.c @@ -4947,27 +4947,27 @@ get_job_options(typval_T *tv, jobopt_T * opt->jo_set2 |= JO2_TERM_KILL; opt->jo_term_kill = tv_get_string_chk(item); } - else if (STRCMP(hi->hi_key, "term_mode") == 0) + else if (STRCMP(hi->hi_key, "tty_type") == 0) { char_u *p; - if (!(supported2 & JO2_TERM_MODE)) + if (!(supported2 & JO2_TTY_TYPE)) break; - opt->jo_set2 |= JO2_TERM_MODE; + opt->jo_set2 |= JO2_TTY_TYPE; p = tv_get_string_chk(item); if (p == NULL) { - semsg(_(e_invargval), "term_mode"); + semsg(_(e_invargval), "tty_type"); return FAIL; } // Allow empty string, "winpty", "conpty". if (!(*p == NUL || STRCMP(p, "winpty") == 0 || STRCMP(p, "conpty") == 0)) { - semsg(_(e_invargval), "term_mode"); + semsg(_(e_invargval), "tty_type"); return FAIL; } - opt->jo_term_mode = p[0]; + opt->jo_tty_type = p[0]; } # if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS) else if (STRCMP(hi->hi_key, "ansi_colors") == 0) @@ -5194,6 +5194,9 @@ job_free_contents(job_T *job) #ifdef UNIX vim_free(job->jv_termsig); #endif +#ifdef WIN3264 + vim_free(job->jv_tty_type); +#endif free_callback(job->jv_exit_cb, job->jv_exit_partial); if (job->jv_argv != NULL) { @@ -5963,6 +5966,9 @@ job_info(job_T *job, dict_T *dict) #ifdef UNIX dict_add_string(dict, "termsig", job->jv_termsig); #endif +#ifdef WIN3264 + dict_add_string(dict, "tty_type", job->jv_tty_type); +#endif l = list_alloc(); if (l != NULL)