From d768ee38b2a82e14b37e9471a145e736af6bb229 Mon Sep 17 00:00:00 2001 From: Justine Date: Mon, 20 Feb 2023 17:59:21 +0100 Subject: [PATCH] Ctrl+C resets the current history number --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index c3be450..3c25d16 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -356,6 +356,7 @@ pub mod shell { Key::Ctrl('c') => { current_pos = 0; max_pos = 0; + current_number = get_curr_history_number(); mycommand.clear(); write!(stdout, "\r\n--CANCEL--\r\n"); write!(stdout, "{}", conf.promptline);