From e03ecb7d31c10aab8a8acbfb3cdd7ec558cd49eb Mon Sep 17 00:00:00 2001 From: Enan Ajmain <3nan.ajmain@gmail.com> Date: Wed, 15 Feb 2023 01:15:28 +0600 Subject: fix: uv_tty_set_mode failed in Windows #22264 Problem: uv_tty_set_mode on stdout in Windows exits with error. Cause: Windows cannot set the properties of the output of a tty. Solution: Remove call to uv_tty_set_mode. Ref: #21445 Ref: https://github.com/libuv/libuv/commit/88634c1405097c19582e870d278dd0e29dc55455#r100598822 --- src/nvim/tui/tui.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index f7bc931e21..8df6e49b77 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -359,12 +359,7 @@ static void terminfo_start(TUIData *tui) if (ret) { ELOG("uv_tty_init failed: %s", uv_strerror(ret)); } -#ifdef MSWIN - ret = uv_tty_set_mode(&tui->output_handle.tty, UV_TTY_MODE_RAW); - if (ret) { - ELOG("uv_tty_set_mode failed: %s", uv_strerror(ret)); - } -#else +#ifndef MSWIN int retry_count = 10; // A signal may cause uv_tty_set_mode() to fail (e.g., SIGCONT). Retry a // few times. #12322 -- cgit