diff options
author | erw7 <erw7.github@gmail.com> | 2019-06-10 11:22:07 +0900 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-06-10 16:43:52 +0200 |
commit | ce90a19abd5ba0188454574ee7691d06a4534f8a (patch) | |
tree | d8ea5b2c9d43b8784033b2d1ba01880690a07360 /src/nvim/os/input.c | |
parent | 04e2ba85b1135a669f626ed59ceb2f797bc40997 (diff) | |
download | rneovim-ce90a19abd5ba0188454574ee7691d06a4534f8a.tar.gz rneovim-ce90a19abd5ba0188454574ee7691d06a4534f8a.tar.bz2 rneovim-ce90a19abd5ba0188454574ee7691d06a4534f8a.zip |
TUI: set os/input.c:global_fd to input->in_fd #10174
Problem: When we changed startup to wait for the TUI (like a remote UI),
we forgot to set os/input.c:global_fd. That used to be done by
input_start().
Solution: Initialize os/input.c:global_fd before initializing libtermkey
(termkey_new_abstract) so that tui_get_stty_erase() and
friends can inspect the correct fd.
fixes #10134
close #10174
Diffstat (limited to 'src/nvim/os/input.c')
-rw-r--r-- | src/nvim/os/input.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c index 8070f4c420..5d43dff5c1 100644 --- a/src/nvim/os/input.c +++ b/src/nvim/os/input.c @@ -50,6 +50,11 @@ void input_init(void) input_buffer = rbuffer_new(INPUT_BUFFER_SIZE + MAX_KEY_CODE_LEN); } +void input_global_fd_init(int fd) +{ + global_fd = fd; +} + /// Global TTY (or pipe for "-es") input stream, before UI starts. int input_global_fd(void) { @@ -62,7 +67,7 @@ void input_start(int fd) return; } - global_fd = fd; + input_global_fd_init(fd); rstream_init_fd(&main_loop, &read_stream, fd, READ_BUFFER_SIZE); rstream_start(&read_stream, input_read_cb, NULL); } |