summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2020-11-03 09:15:29 +0900
committerGitHub <noreply@github.com>2020-11-03 01:15:29 +0100
commite736d0f60f6cdf38e2d317ee08a7125de9e57d69 (patch)
tree9d1970400946a7695e5b48dc120e947b9df438c7 /core
parent1c1889851d91807a1d480c79436dce4a32f61e9d (diff)
fix(prompt): fix display of non-ASCII characters on Windows (#8199)
Diffstat (limited to 'core')
-rw-r--r--core/bindings.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/bindings.rs b/core/bindings.rs
index 4b2c39881..47dadf422 100644
--- a/core/bindings.rs
+++ b/core/bindings.rs
@@ -11,6 +11,7 @@ use futures::future::FutureExt;
use rusty_v8 as v8;
use std::cell::Cell;
use std::convert::TryFrom;
+use std::io::{stdout, Write};
use std::option::Option;
use url::Url;
use v8::MapFnTo;
@@ -352,8 +353,10 @@ fn print(
};
if is_err {
eprint!("{}", str_.to_rust_string_lossy(tc_scope));
+ stdout().flush().unwrap();
} else {
print!("{}", str_.to_rust_string_lossy(tc_scope));
+ stdout().flush().unwrap();
}
}