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/os/pty_process_win.h | |
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/os/pty_process_win.h')
-rw-r--r-- | src/nvim/os/pty_process_win.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/nvim/os/pty_process_win.h b/src/nvim/os/pty_process_win.h index 1a4019e654..49a0d420ad 100644 --- a/src/nvim/os/pty_process_win.h +++ b/src/nvim/os/pty_process_win.h @@ -6,12 +6,22 @@ #include "nvim/event/process.h" #include "nvim/lib/queue.h" +#include "nvim/os/os_win_conpty.h" + +typedef enum { + PTY_TYPE_WINPTY, + PTY_TYPE_CONPTY +} pty_type_t; typedef struct pty_process { Process process; char *term_name; uint16_t width, height; - winpty_t *winpty_object; + union { + winpty_t *winpty_object; + conpty_t *conpty_object; + } pty_object; + pty_type_t type; HANDLE finish_wait; HANDLE process_handle; uv_timer_t wait_eof_timer; @@ -30,7 +40,8 @@ static inline PtyProcess pty_process_init(Loop *loop, void *data) rv.term_name = NULL; rv.width = 80; rv.height = 24; - rv.winpty_object = NULL; + rv.pty_object.winpty_object = NULL; + rv.type = PTY_TYPE_WINPTY; rv.finish_wait = NULL; rv.process_handle = NULL; return rv; |