cmd-server: fflush before reading next line
Seems this is necessary on Windows/MSYS2. HT to juanjosegarciaripoll.
This commit is contained in:
@ -115,7 +115,7 @@ mu_cmd_server (const MuConfig *opts, GError **err) try {
|
|||||||
|
|
||||||
bool do_quit{};
|
bool do_quit{};
|
||||||
while (!MuTerminate && !do_quit) {
|
while (!MuTerminate && !do_quit) {
|
||||||
|
::fflush(::stdout); // Needed for Windows, see issue #1827.
|
||||||
const auto line{read_line(do_quit)};
|
const auto line{read_line(do_quit)};
|
||||||
if (line.find_first_not_of(" \t") == std::string::npos)
|
if (line.find_first_not_of(" \t") == std::string::npos)
|
||||||
continue; // skip whitespace-only lines
|
continue; // skip whitespace-only lines
|
||||||
|
|||||||
Reference in New Issue
Block a user