From 5bd655f38c20c8a005e07d1d6697960be61cfcf4 Mon Sep 17 00:00:00 2001 From: aymey Date: Fri, 29 Dec 2023 17:22:20 +1100 Subject: [PATCH] store invalid commands in hist --- src/session.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/session.rs b/src/session.rs index a9da613..0719ee9 100644 --- a/src/session.rs +++ b/src/session.rs @@ -3034,11 +3034,10 @@ impl Session { match self.cmdline.parse(&input) { Err(e) => self.message(format!("Error: {}", e), MessageType::Error), - Ok(cmd) => { - self.command(cmd); - self.cmdline.history.add(input); - } + Ok(cmd) => self.command(cmd), } + + self.cmdline.history.add(input); } fn cmdline_handle_input(&mut self, c: char) {