Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c933a9e2 authored by Sonny Sasaka's avatar Sonny Sasaka Committed by Gerrit Code Review
Browse files

Merge "Floss: Treat ctrl-C as cancelling command instead of exiting"

parents 4f018189 c2915b3a
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -566,6 +566,11 @@ async fn start_interactive_shell(
                print_info!("Adapter {} is ready", adapter_address);
                print_info!("Adapter {} is ready", adapter_address);
            }
            }
            ForegroundActions::Readline(result) => match result {
            ForegroundActions::Readline(result) => match result {
                Err(rustyline::error::ReadlineError::Interrupted) => {
                    // Ctrl-C cancels the currently typed line, do nothing and ready to do next
                    // readline again.
                    semaphore_fg.add_permits(1);
                }
                Err(_err) => {
                Err(_err) => {
                    break;
                    break;
                }
                }