@@ -885,8 +885,15 @@ mod cmd {
887 fn open(editor: &mut Editor, args: &[&str], event: PromptEvent) {
887 fn open(editor: &mut Editor, args: &[&str], event: PromptEvent) {
888− let path = args[0];
888+ match args.get(0) {
890+ // TODO: handle error
889− editor.open(path.into(), Action::Replace);
891+ editor.open(path.into(), Action::Replace);
894+ editor.set_error("wrong argument count".to_string());
892 fn write(editor: &mut Editor, args: &[&str], event: PromptEvent) {
899 fn write(editor: &mut Editor, args: &[&str], event: PromptEvent) {