diff options
author | erw7 <erw7.github@gmail.com> | 2019-11-09 15:46:12 +0900 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2020-01-17 11:36:28 +0100 |
commit | 5355cee77d7b3b62917036281406726832b6d7dc (patch) | |
tree | 17ce6d9f2a96613d2c6d12ec86475f40bf05b6f8 /src/nvim/option.c | |
parent | 8fe0635e7338e32e8aedeb8f2e2c0f246876375c (diff) | |
download | rneovim-5355cee77d7b3b62917036281406726832b6d7dc.tar.gz rneovim-5355cee77d7b3b62917036281406726832b6d7dc.tar.bz2 rneovim-5355cee77d7b3b62917036281406726832b6d7dc.zip |
Change to use ConPTY, if available
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 9d3e02949e..591c8234c3 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -76,6 +76,9 @@ #include "nvim/undo.h" #include "nvim/window.h" #include "nvim/os/os.h" +#ifdef WIN32 +# include "nvim/os/os_win_conpty.h" +#endif #include "nvim/api/private/helpers.h" #include "nvim/os/input.h" #include "nvim/os/lang.h" @@ -310,6 +313,9 @@ static char *(p_scl_values[]) = { "yes", "no", "auto", "auto:1", "auto:2", "auto:3", "auto:4", "auto:5", "auto:6", "auto:7", "auto:8", "auto:9", "yes:1", "yes:2", "yes:3", "yes:4", "yes:5", "yes:6", "yes:7", "yes:8", "yes:9", NULL }; +#ifdef WIN32 +static char *(p_twt_values[]) = { "conpty", "winpty", "", NULL }; +#endif /// All possible flags for 'shm'. static char_u SHM_ALL[] = { @@ -3282,6 +3288,13 @@ ambw_end: if (!parse_winhl_opt(curwin)) { errmsg = e_invarg; } +#ifdef WIN32 + } else if (varp == &p_twt) { + if (check_opt_strings(*varp, p_twt_values, false) != OK + || (!os_has_conpty_working() && STRCMP(*varp, "conpty") == 0)) { + errmsg = e_invarg; + } +#endif } else { // Options that are a list of flags. p = NULL; |