Commit 7a91f209 authored by Daan Planken's avatar Daan Planken

Fix bug when entering invalid command in prompt

parent 45ee23fb
......@@ -277,11 +277,11 @@ impl Editor {
self.cursor_mut().mode = Command(Normal);
if let Some(cmd) = PromptCommand::parse(&self.prompt.clone()) {
self.invoke(cmd);
self.prompt = String::new();
self.redraw_task = RedrawTask::StatusBar;
} else {
self.status_bar.msg = format!("Unknown command: {}", self.prompt);
}
self.prompt = String::new();
}
(Primitive(Prompt), Backspace) => {
self.prompt.pop();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment