mirror of https://github.com/djcb/mu.git
cmd-server: fflush before reading next line
Seems this is necessary on Windows/MSYS2. HT to juanjosegarciaripoll.
This commit is contained in:
parent
273eb822d5
commit
0ef88af34e
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue