win: support :terminal

This commit is contained in:
erw7
2017-03-28 18:07:58 +09:00
committed by Justin M. Keyes
parent a797856755
commit 4b1f21de75
12 changed files with 290 additions and 114 deletions

View File

@@ -5,19 +5,24 @@
#include <winpty.h>
#include "nvim/event/libuv_process.h"
#include "nvim/event/process.h"
#include "nvim/lib/queue.h"
typedef struct pty_process {
Process process;
char *term_name;
uint16_t width, height;
winpty_t *wp;
uv_async_t finish_async;
HANDLE finish_wait;
HANDLE process_handle;
bool is_closing;
uv_timer_t wait_eof_timer;
} PtyProcess;
typedef struct arg_S {
char *arg;
QUEUE node;
} arg_T;
static inline PtyProcess pty_process_init(Loop *loop, void *data)
{
PtyProcess rv;
@@ -26,10 +31,8 @@ static inline PtyProcess pty_process_init(Loop *loop, void *data)
rv.width = 80;
rv.height = 24;
rv.wp = NULL;
// XXX: Zero rv.finish_async somehow?
rv.finish_wait = NULL;
rv.process_handle = NULL;
rv.is_closing = false;
return rv;
}