@@ -440,8 +440,15 @@ pub fn command_mode(cx: &mut Context) {
440440 return;
441441 }
442442
443− match input {
444− "q" => editor.should_close = true,
443+ let parts = input.split_ascii_whitespace().collect::<Vec<&str>>();
444+
445+ match parts.as_slice() {
446+ &["q"] => editor.should_close = true,
447+ &["o", path] => {
448+ // TODO: make view()/view_mut() always contain a view.
449+ let size = editor.view().unwrap().size;
450+ editor.open(path.into(), size);
451+ }
445452 _ => (),
446453 }
447454 },