Fix history adding

This commit is contained in:
greg 2018-04-23 19:03:32 -07:00
parent 65f42981ff
commit c9ea48e9d1

View File

@ -191,7 +191,10 @@ impl Repl {
Ok(ref input) => { Ok(ref input) => {
let output = match input.chars().nth(0) { let output = match input.chars().nth(0) {
Some(ch) if ch == self.interpreter_directive_sigil => self.handle_interpreter_directive(input), Some(ch) if ch == self.interpreter_directive_sigil => self.handle_interpreter_directive(input),
_ => Some(self.input_handler(input)), _ => {
self.console.get_history().add(input);
Some(self.input_handler(input))
}
}; };
if let Some(o) = output { if let Some(o) = output {
println!("=> {}", o); println!("=> {}", o);