Skip to content
Snippets Groups Projects
Commit 7a91f209 authored by Daan Planken's avatar Daan Planken
Browse files

Fix bug when entering invalid command in prompt

parent 45ee23fb
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment