-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
[RFC] Fix stall before starting tui when something is output in Windows #9825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I don't know if it's really all right, but is it better to fix |
That seems slightly better to me, if this is something that's always required for streams on Windows. But for #7967 I think the best approach is to simply not print anything until startup is ready, as @bfredl mentioned. Alternatively, collect messages in a list which is later printed. |
I do not understand exactly what it does, but I implemented it referring to the embedded case. The behavior is different from vim(A message is displayed after the screen is cleared, but on vim a message is displayed before the screen is cleared), but it seems to be working. This closes because I created #9829. |
Change to use COIN$ for reading when using stdin for command reading on Windows.
rstream_init_fd(loop, &input->read_stream, input->in_fd, 0xfff); | ||
#ifdef WIN32 | ||
uv_tty_set_mode(&input->read_stream.uv.tty, UV_TTY_MODE_RAW); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not do this in stream_init
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All current calls need to do uv_tty_set_mode(..., ..., UV_TTY_MODE_RAW)
, so I think that's fine. There may be calls that do not need it, so I did not.
#ifdef WIN32 | ||
int fd; | ||
HANDLE conin_handle = INVALID_HANDLE_VALUE; | ||
#endif | ||
if (reading_tty || reading_excmds) { | ||
// One of the startup commands (arguments, sourced scripts or plugins) may | ||
// prompt the user, so start reading from a tty now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixes #7967