Fixing alternate screen initialization for ANSI-supporting Windows terminals (#153)

This commit is contained in:
svartalf 2019-06-16 19:43:18 +03:00 committed by Timon
parent cdb393ef71
commit 2b36dbf9d9

View File

@ -40,10 +40,10 @@ impl AlternateScreen {
pub fn to_alternate(raw_mode: bool) -> io::Result<AlternateScreen> {
#[cfg(windows)]
let command = if supports_ansi() {
Box::from(ToAlternateScreenCommand::new())
Box::from(sys::ToAlternateScreenCommand::new())
as Box<(dyn IAlternateScreenCommand + Sync + Send)>
} else {
Box::from(sys::ToAlternateScreenCommand::new())
Box::from(ToAlternateScreenCommand::new())
as Box<(dyn IAlternateScreenCommand + Sync + Send)>
};