diff --git a/cursive/src/backends/curses/n.rs b/cursive/src/backends/curses/n.rs index a17c96e2..dd8c0a27 100644 --- a/cursive/src/backends/curses/n.rs +++ b/cursive/src/backends/curses/n.rs @@ -110,7 +110,10 @@ impl Backend { let path = CString::new(output_path).unwrap(); unsafe { libc::fopen(path.as_ptr(), mode.as_ptr()) } }; - ncurses::newterm(None, output, input); + ncurses::newterm(None, output, input).map_err(|e| { + io::Error::new(io::ErrorKind::Other, format!("could not call newterm: {e}")) + })?; + // Enable keypad (like arrows) ncurses::keypad(ncurses::stdscr(), true);