summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-08 12:47:03 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-08 12:47:03 +0100
commitc6ddce3f2cf6daa3a545405373b661f8a9bccad9 (patch)
tree080830ec75202e61d48d27e4e951dc849fe4cbfc /src/option.c
parent0036201a1a096913840d3df8ff08eb58eaae90a6 (diff)
downloadvim-git-c6ddce3f2cf6daa3a545405373b661f8a9bccad9.tar.gz
patch 8.1.0880: MS-Windows: inconsistent selection of winpty/conptyv8.1.0880
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)
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/option.c b/src/option.c
index 77d1024ec..c8808be04 100644
--- a/src/option.c
+++ b/src/option.c
@@ -253,7 +253,6 @@
# define PV_TWK OPT_WIN(WV_TWK)
# define PV_TWS OPT_WIN(WV_TWS)
# define PV_TWSL OPT_BUF(BV_TWSL)
-# define PV_TMOD OPT_WIN(WV_TMOD)
#endif
#ifdef FEAT_SIGNS
# define PV_SCL OPT_WIN(WV_SCL)
@@ -2701,15 +2700,6 @@ static struct vimoption options[] =
{(char_u *)FALSE, (char_u *)FALSE}
#endif
SCTX_INIT},
- {"termmode", "tmod", P_STRING|P_ALLOCED|P_VI_DEF,
-#ifdef FEAT_TERMINAL
- (char_u *)VAR_WIN, PV_TMOD,
- {(char_u *)"", (char_u *)NULL}
-#else
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
-#endif
- SCTX_INIT},
{"termwinkey", "twk", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF,
#ifdef FEAT_TERMINAL
(char_u *)VAR_WIN, PV_TWK,
@@ -2737,6 +2727,15 @@ static struct vimoption options[] =
{(char_u *)NULL, (char_u *)0L}
#endif
SCTX_INIT},
+ {"termwintype", "twt", P_STRING|P_ALLOCED|P_VI_DEF,
+#if defined(WIN3264) && defined(FEAT_TERMINAL)
+ (char_u *)&p_twt, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+#else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+#endif
+ SCTX_INIT},
{"terse", NULL, P_BOOL|P_VI_DEF,
(char_u *)&p_terse, PV_NONE,
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
@@ -3218,8 +3217,8 @@ static char *(p_cot_values[]) = {"menu", "menuone", "longest", "preview", "noins
#ifdef FEAT_SIGNS
static char *(p_scl_values[]) = {"yes", "no", "auto", NULL};
#endif
-#ifdef FEAT_TERMINAL
-static char *(p_tmod_values[]) = {"winpty", "conpty", "", NULL};
+#if defined(WIN3264) && defined(FEAT_TERMINAL)
+static char *(p_twt_values[]) = {"winpty", "conpty", "", NULL};
#endif
static void set_options_default(int opt_flags);
@@ -7505,12 +7504,14 @@ did_set_string_option(
errmsg = e_invarg;
}
}
- // 'termmode'
- else if (varp == &curwin->w_p_tmod)
+# if defined(WIN3264)
+ // 'termwintype'
+ else if (varp == &p_twt)
{
- if (check_opt_strings(*varp, p_tmod_values, FALSE) != OK)
+ if (check_opt_strings(*varp, p_twt_values, FALSE) != OK)
errmsg = e_invarg;
}
+# endif
#endif
#ifdef FEAT_VARTABS
@@ -10952,7 +10953,6 @@ get_varp(struct vimoption *p)
case PV_TWK: return (char_u *)&(curwin->w_p_twk);
case PV_TWS: return (char_u *)&(curwin->w_p_tws);
case PV_TWSL: return (char_u *)&(curbuf->b_p_twsl);
- case PV_TMOD: return (char_u *)&(curwin->w_p_tmod);
#endif
case PV_AI: return (char_u *)&(curbuf->b_p_ai);
@@ -11153,7 +11153,6 @@ copy_winopt(winopt_T *from, winopt_T *to)
#ifdef FEAT_TERMINAL
to->wo_twk = vim_strsave(from->wo_twk);
to->wo_tws = vim_strsave(from->wo_tws);
- to->wo_tmod = vim_strsave(from->wo_tmod);
#endif
#ifdef FEAT_FOLDING
to->wo_fdc = from->wo_fdc;
@@ -11224,7 +11223,6 @@ check_winopt(winopt_T *wop UNUSED)
#ifdef FEAT_TERMINAL
check_string_option(&wop->wo_twk);
check_string_option(&wop->wo_tws);
- check_string_option(&wop->wo_tmod);
#endif
#ifdef FEAT_LINEBREAK
check_string_option(&wop->wo_briopt);
@@ -11268,7 +11266,6 @@ clear_winopt(winopt_T *wop UNUSED)
#ifdef FEAT_TERMINAL
clear_string_option(&wop->wo_twk);
clear_string_option(&wop->wo_tws);
- clear_string_option(&wop->wo_tmod);
#endif
}