diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-05-27 09:34:40 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-05-27 09:34:40 -0400 |
commit | 3dd166b20387607d73fee01507e7c9ddcfa9bcd4 (patch) | |
tree | 5647ea22f1e7fd35b56df9893ebfd5717481d857 /src/nvim/main.c | |
parent | 5a9ad68b258f33ebd7fa0a5da47b308f50f1e5e7 (diff) | |
parent | b2c400b3f2354b2765e1d6f3b5ce4b11f2ab75a3 (diff) | |
download | rneovim-3dd166b20387607d73fee01507e7c9ddcfa9bcd4.tar.gz rneovim-3dd166b20387607d73fee01507e7c9ddcfa9bcd4.tar.bz2 rneovim-3dd166b20387607d73fee01507e7c9ddcfa9bcd4.zip |
Merge #2598 'set stdin as "blocking" on exit'
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 5f0372f30e..fc72039b5f 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -271,17 +271,15 @@ int main(int argc, char **argv) || params.output_isatty || params.err_isatty); if (reading_input) { - // Its possible that one of the startup commands(arguments, sourced scripts - // or plugins) will prompt the user, so start reading from a tty stream - // now. + // One of the startup commands (arguments, sourced scripts or plugins) may + // prompt the user, so start reading from a tty now. int fd = fileno(stdin); if (!params.input_isatty || params.edit_type == EDIT_STDIN) { - // use stderr or stdout since stdin is not a tty and/or could be used to - // read the file we'll edit when the "-" argument is given(eg: cat file | - // nvim -) + // Use stderr or stdout since stdin is not a tty and/or could be used to + // read the "-" file (eg: cat file | nvim -) fd = params.err_isatty ? fileno(stderr) : fileno(stdout); } - input_start_stdin(fd); + input_start(fd); } // open terminals when opening files that start with term:// @@ -388,8 +386,8 @@ int main(int argc, char **argv) } if (!params.headless) { - // Stop reading from stdin, the UI layer will take over now - input_stop_stdin(); + // Stop reading from input stream, the UI layer will take over now. + input_stop(); ui_builtin_start(); } |