summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/shell/history/entry.rs4
1 files changed, 3 insertions, 1 deletions
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(