diff --git a/cursive/src/backends/curses/n.rs b/cursive/src/backends/curses/n.rs index d9f63896..8da31a1a 100644 --- a/cursive/src/backends/curses/n.rs +++ b/cursive/src/backends/curses/n.rs @@ -110,7 +110,12 @@ impl Backend { let path = CString::new(output_path).unwrap(); unsafe { libc::fopen(path.as_ptr(), mode.as_ptr()) } }; - ncurses::newterm(None, output, input); + let _ = ncurses::newterm(None, output, input).unwrap(); + // unwrap() is guaranteed not* to panic here ^ unless the underlaying + // ncurses-rs implementation changes API in the future and returns Err + // for other reasons as well, which we do want to catch/panic due to. + // *because no string is being passed as the first arg. to newterm + // Enable keypad (like arrows) ncurses::keypad(ncurses::stdscr(), true);