From 21035ea723f2a85328fc1b7b50f9488097346ab4 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 11 Jan 2022 11:14:18 -0500 Subject: don't allow an entry to transition from exited back to running --- src/shell/history/entry.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shell/history/entry.rs b/src/shell/history/entry.rs index f2a7d08..b20321d 100644 --- a/src/shell/history/entry.rs +++ b/src/shell/history/entry.rs @@ -313,7 +313,9 @@ impl Entry { } pub fn set_span(&mut self, span: (usize, usize)) { - self.state = State::Running(span); + if matches!(self.state, State::Running(_)) { + self.state = State::Running(span); + } } pub async fn finish( -- cgit v1.2.3-54-g00ecf