diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-05-26 11:16:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-26 11:16:27 +0200 |
commit | ad62bd471da43e3efa2f9f8981e91b9af92901c0 (patch) | |
tree | 3dd5c8f07994503c8112e6379a40b04507684f60 | |
parent | d31f7648ecaf32426239020331d1bbe9a6f56140 (diff) | |
parent | 4bfc7802f056c2e1284edad3f8b7943f7f25d493 (diff) | |
download | rneovim-ad62bd471da43e3efa2f9f8981e91b9af92901c0.tar.gz rneovim-ad62bd471da43e3efa2f9f8981e91b9af92901c0.tar.bz2 rneovim-ad62bd471da43e3efa2f9f8981e91b9af92901c0.zip |
Merge pull request #23523 from 3N4N/fix/api-info
fix(windows): set stdout to binary mode for "--api-info"
-rw-r--r-- | src/nvim/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 6015bbd06e..d4fbf8ce93 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -1056,6 +1056,10 @@ static void command_line_scan(mparm_T *parmp) version(); os_exit(0); } else if (STRICMP(argv[0] + argv_idx, "api-info") == 0) { +#ifdef MSWIN + // set stdout to binary to avoid crlf in --api-info output + _setmode(STDOUT_FILENO, _O_BINARY); +#endif FileDescriptor fp; const int fof_ret = file_open_fd(&fp, STDOUT_FILENO, kFileWriteOnly); |