Fix prompt resetting when switching to ascii mode
This commit is contained in:
parent
27be72f3be
commit
9c17bcfeb8
@ -281,12 +281,15 @@ fn start_display_thread(request_recv: Receiver<DisplayMessage>) {
|
|||||||
}
|
}
|
||||||
DisplayMessage::SwitchAsciiMode => {
|
DisplayMessage::SwitchAsciiMode => {
|
||||||
ascii_mode = !ascii_mode;
|
ascii_mode = !ascii_mode;
|
||||||
|
write!(stdout, "{}", termion::cursor::Save,).unwrap();
|
||||||
|
|
||||||
clichess::print_board_representation(
|
clichess::print_board_representation(
|
||||||
&clichess::parse_position(&last_fen_position),
|
&clichess::parse_position(&last_fen_position),
|
||||||
last_side,
|
last_side,
|
||||||
&mut stdout,
|
&mut stdout,
|
||||||
ascii_mode,
|
ascii_mode,
|
||||||
);
|
);
|
||||||
|
write!(stdout, "{}", termion::cursor::Restore).unwrap();
|
||||||
}
|
}
|
||||||
DisplayMessage::Message(s) => write!(
|
DisplayMessage::Message(s) => write!(
|
||||||
stdout,
|
stdout,
|
||||||
|
Loading…
Reference in New Issue
Block a user