cmd-server: fflush before reading next line

Seems this is necessary on Windows/MSYS2. HT to juanjosegarciaripoll.
This commit is contained in:
Dirk-Jan C. Binnema 2020-12-06 17:02:19 +02:00
parent 273eb822d5
commit 0ef88af34e
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ mu_cmd_server (const MuConfig *opts, GError **err) try {
bool do_quit{};
while (!MuTerminate && !do_quit) {
::fflush(::stdout); // Needed for Windows, see issue #1827.
const auto line{read_line(do_quit)};
if (line.find_first_not_of(" \t") == std::string::npos)
continue; // skip whitespace-only lines