Skip to content

Commit 809e320

Browse files
committed
Minor repl fix
1 parent e334941 commit 809e320

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ fn run_shell(vm: &mut VirtualMachine) -> PyResult {
171171
debug!("You entered {:?}", input);
172172
if shell_exec(vm, &input, vars.clone()) {
173173
// Line was complete.
174-
rl.add_history_entry(input.as_ref());
174+
rl.add_history_entry(input.trim_right().as_ref());
175175
input = String::new();
176176
} else {
177177
loop {
@@ -184,7 +184,7 @@ fn run_shell(vm: &mut VirtualMachine) -> PyResult {
184184
Ok(line) => {
185185
if line.len() == 0 {
186186
if shell_exec(vm, &input, vars.clone()) {
187-
rl.add_history_entry(input.as_ref());
187+
rl.add_history_entry(input.trim_right().as_ref());
188188
input = String::new();
189189
break;
190190
}

0 commit comments

Comments
 (0)