comparison 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
comparison
equal deleted inserted replaced
15745:655ee4b0a5cc 15746:c017195b121b
4945 if (!(supported2 & JO2_TERM_KILL)) 4945 if (!(supported2 & JO2_TERM_KILL))
4946 break; 4946 break;
4947 opt->jo_set2 |= JO2_TERM_KILL; 4947 opt->jo_set2 |= JO2_TERM_KILL;
4948 opt->jo_term_kill = tv_get_string_chk(item); 4948 opt->jo_term_kill = tv_get_string_chk(item);
4949 } 4949 }
4950 else if (STRCMP(hi->hi_key, "term_mode") == 0) 4950 else if (STRCMP(hi->hi_key, "tty_type") == 0)
4951 { 4951 {
4952 char_u *p; 4952 char_u *p;
4953 4953
4954 if (!(supported2 & JO2_TERM_MODE)) 4954 if (!(supported2 & JO2_TTY_TYPE))
4955 break; 4955 break;
4956 opt->jo_set2 |= JO2_TERM_MODE; 4956 opt->jo_set2 |= JO2_TTY_TYPE;
4957 p = tv_get_string_chk(item); 4957 p = tv_get_string_chk(item);
4958 if (p == NULL) 4958 if (p == NULL)
4959 { 4959 {
4960 semsg(_(e_invargval), "term_mode"); 4960 semsg(_(e_invargval), "tty_type");
4961 return FAIL; 4961 return FAIL;
4962 } 4962 }
4963 // Allow empty string, "winpty", "conpty". 4963 // Allow empty string, "winpty", "conpty".
4964 if (!(*p == NUL || STRCMP(p, "winpty") == 0 4964 if (!(*p == NUL || STRCMP(p, "winpty") == 0
4965 || STRCMP(p, "conpty") == 0)) 4965 || STRCMP(p, "conpty") == 0))
4966 { 4966 {
4967 semsg(_(e_invargval), "term_mode"); 4967 semsg(_(e_invargval), "tty_type");
4968 return FAIL; 4968 return FAIL;
4969 } 4969 }
4970 opt->jo_term_mode = p[0]; 4970 opt->jo_tty_type = p[0];
4971 } 4971 }
4972 # if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS) 4972 # if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
4973 else if (STRCMP(hi->hi_key, "ansi_colors") == 0) 4973 else if (STRCMP(hi->hi_key, "ansi_colors") == 0)
4974 { 4974 {
4975 int n = 0; 4975 int n = 0;
5191 vim_free(job->jv_tty_in); 5191 vim_free(job->jv_tty_in);
5192 vim_free(job->jv_tty_out); 5192 vim_free(job->jv_tty_out);
5193 vim_free(job->jv_stoponexit); 5193 vim_free(job->jv_stoponexit);
5194 #ifdef UNIX 5194 #ifdef UNIX
5195 vim_free(job->jv_termsig); 5195 vim_free(job->jv_termsig);
5196 #endif
5197 #ifdef WIN3264
5198 vim_free(job->jv_tty_type);
5196 #endif 5199 #endif
5197 free_callback(job->jv_exit_cb, job->jv_exit_partial); 5200 free_callback(job->jv_exit_cb, job->jv_exit_partial);
5198 if (job->jv_argv != NULL) 5201 if (job->jv_argv != NULL)
5199 { 5202 {
5200 for (i = 0; job->jv_argv[i] != NULL; i++) 5203 for (i = 0; job->jv_argv[i] != NULL; i++)
5961 dict_add_string(dict, "exit_cb", job->jv_exit_cb); 5964 dict_add_string(dict, "exit_cb", job->jv_exit_cb);
5962 dict_add_string(dict, "stoponexit", job->jv_stoponexit); 5965 dict_add_string(dict, "stoponexit", job->jv_stoponexit);
5963 #ifdef UNIX 5966 #ifdef UNIX
5964 dict_add_string(dict, "termsig", job->jv_termsig); 5967 dict_add_string(dict, "termsig", job->jv_termsig);
5965 #endif 5968 #endif
5969 #ifdef WIN3264
5970 dict_add_string(dict, "tty_type", job->jv_tty_type);
5971 #endif
5966 5972
5967 l = list_alloc(); 5973 l = list_alloc();
5968 if (l != NULL) 5974 if (l != NULL)
5969 { 5975 {
5970 dict_add_list(dict, "cmd", l); 5976 dict_add_list(dict, "cmd", l);