+ b'j' | b'J' => {
+ sender.send(Command::PauseDisplay).unwrap();
+ let cstate = CmdLineState::new_normal();
+ // wait so that the main thread stops displaying
+ thread::sleep(std::time::Duration::from_millis(500));
+ print!("\nJump to: ");
+ let mut str = String::new();
+ let ret = file.read_line(&mut str);
+ cstate.restore();
+ sender.send(Command::ResumeDisplay).unwrap();
+
+ if ret.is_ok() && str.len() > 1 {
+ str.pop(); // newline
+ if let Ok(NATimePoint::Milliseconds(time)) = str.parse::<NATimePoint>() {
+ sender.send(Command::Seek(time)).unwrap();
+ } else {
+ println!("wrong time");
+ }
+ }
+ },