mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 11:14:38 +08:00
Minor repl fix
This commit is contained in:
1 parent
e334941728
commit
809e320ee3
1 file changed
+2
-2
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user