Call resize_item on Windows only

This commit is contained in:
Alexander Gavrilov 2018-01-09 08:24:17 -08:00
parent 7469bd36be
commit f8f23a5dda

View File

@ -414,7 +414,11 @@ impl backend::Backend for Concrete {
pancurses::Input::KeySuspend => Event::Refresh,
pancurses::Input::KeyUndo => Event::Refresh,
pancurses::Input::KeyResize => {
pancurses::resize_term(0, 0);
// Let pancurses adjust their structures when the window is resized.
// Do it for Windows only, as 'resize_term' is not implemented for Unix
if cfg!(target_os = "windows") {
pancurses::resize_term(0, 0);
}
Event::WindowResize
},
pancurses::Input::KeyEvent => Event::Refresh,