Minor repl fix

This commit is contained in:
Éloi Rivard committed 2018-10-18 10:21:26 +02:00
1 parent e334941728
commit 809e320ee3
1 file changed
+2 -2
+2 -2
View File
@@ -171,7 +171,7 @@ fn run_shell(vm: &mut VirtualMachine) -> PyResult {
debug!("You entered {:?}", input);
if shell_exec(vm, &input, vars.clone()) {
// Line was complete.
rl.add_history_entry(input.as_ref());
rl.add_history_entry(input.trim_right().as_ref());
input = String::new();
} else {
loop {
@@ -184,7 +184,7 @@ fn run_shell(vm: &mut VirtualMachine) -> PyResult {
Ok(line) => {
if line.len() == 0 {
if shell_exec(vm, &input, vars.clone()) {
rl.add_history_entry(input.as_ref());
rl.add_history_entry(input.trim_right().as_ref());
input = String::new();
break;
}